Git Product home page Git Product logo

Comments (9)

chandu0101 avatar chandu0101 commented on May 28, 2024

i never used it , +1 from me :)

from scalacss.

japgolly avatar japgolly commented on May 28, 2024

Thanks @chandu0101 - the more feedback and voices heard the better.

It's sorta sucks because it actually does address the requirements it was intended for - the problem is it's just a bit fiddly/annoying/alien to use. Might be better to replace it with something based on plain Scala case classes or something.

from scalacss.

matthughes avatar matthughes commented on May 28, 2024

My motivation for using it to be able to skin a component (that represents more than one element).

For example, I have a SearchBar that has a structure something like this:

div(wrapperStyle,
  span(/*magnifying glass icon*/, iconStyle),
  input(`type` := text, inputStyle)
)

I'd like my component to provide a default skin (defined styles for wrapper, icon, and input) but also allow the caller to pass in a custom style set via Props. styleC doesn't really serve this purpose or at least I don't see how it could. What would the type of my style be in Props, just StyleC? It would need to be parametrized so the caller knew they needed to pass in three styles.

from scalacss.

LMnet avatar LMnet commented on May 28, 2024

For me styleC is the most complicated and unclear feature - because of the terrible usage syntax. I understand that this conception may be usefull sometimes, but it creates a lot of syntax noise in the code.

Also, in the most cases I need unsafeChild. I just want to have some css hierarchy without restrictions. In standalone styles I can use & to create nested styles, and this & symbol creates less amount of syntax noise than unsafeChild.

So, my proposal - remove styleC and rename unsafeChild to &. If it will help to remove such huge lib as shapeless it would be really cool!

from scalacss.

joprice avatar joprice commented on May 28, 2024

I started with it and ended up ripping it out and prefixing groups of styles. Dropping the shapeless dependency is also a plus for code size.

from scalacss.

japgolly avatar japgolly commented on May 28, 2024

Yeah same. Will definitely do this (and other work) but it will have to
wait around 2 months unfortunately.

On 25 November 2015 at 13:10, Joseph Price [email protected] wrote:

I started with it and ended up ripping it out and prefixing groups of
styles. Dropping the shapeless dependency is also a plus for code size.


Reply to this email directly or view it on GitHub
#48 (comment).

from scalacss.

japgolly avatar japgolly commented on May 28, 2024

The StyleC experiment was meant to address the following:

  1. A logical/composite style (eg a style for an entire widget) can have multiple CSS styles that need to be applied.
  2. Adding a new sub-style to a composite style should result in a compilation error in all places that you don't update to use the new sub-style.
  3. Styles all have the same type. Adding/removing/reordering sub-styles shouldn't result in silent undetectable errors where the sub-style ends up being applied to the wrong part of HTML.

StyleC does actually solve those things. It's just a horrible pain in the ass to use. Anyway, a replacement will need to at least consider the above goals with the additional goal that it not be horrible to use.

from scalacss.

japgolly avatar japgolly commented on May 28, 2024

Screw it - I'll just remove it without replacement in 0.4.0. No one likes it, I don't think anyone uses it (except me and only in one place). I'd normally deprecate it and offer a replacement but I think this time it'll be better just to get Shapeless off the classpath.

from scalacss.

japgolly avatar japgolly commented on May 28, 2024

Closed via #48. New ticket #71 to find a replacement.

from scalacss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.