Skip to content

Have you considered writing CSS in JS? (helps to remove the folder for each component) #110

Closed

Description

@totty90

Hy!
Usually I write encapsulated components with CSS in JS. Take a look at this lib: https://github.com/hackhat/smart-css You are doing basically almost the same thing where you put the css file near the js file, therefore you could put the CSS into the JS. This could remove the need to have a folder for each component (exception if you need not-shared assets)

Also your long css names could be more beautiful .ComponentName-elementName--modifier { } (<- that's quite ugly IMO). Take a look at this example. I understand that with LESS, this is easier to do, but please consider looking into this approach too because I found it a delight to work with.

I really appreciate the help you are giving here with this lib!

Activity

  1. koistya commented on Feb 21, 2016

    @koistya
    Member

    You, you're right, long CSS class names are ugly. This has been fixed with the introduction of CSS Modules. What do you think about it? Inline CSS looks good, not sure how practical it is since plain CSS is better supported by text editors and IDEs.

    I'm going to close this one as it's not a real issue or feature request. But feel free to continue the conversation on this thread. You're also welcome to participate in discussions on Gitter, Appear.in, or StackOverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions