Git Product home page Git Product logo

Comments (7)

ksheedlo avatar ksheedlo commented on June 21, 2024

Elements of Component CSS section

  1. You never explain why you chose to borrow from SMACSS and BEM. Without changing the structure of the article, you could add a short (1-2 sentence) blurb describing what you like about each one. Or you could add a story explaining how one of these methodologies saved you on a project (and perhaps ultimately fell short).

  2. I still think you should check out Autoprefixer. Even more important than the specific tools, however, is the recognition that Component CSS is designed to go through a build system just like the rest of your frontend code. Boilerplate such as vendor prefixing and similar utilities should be handled by an automated process.

  3. In the SASS section:

    Highly recommend but you can use LESS if you prefer that.

    You're a frontend engineer! It's OK to have a professional recommendation because you know what you're talking about. The way that this is worded comes across as a lack of confidence.

from ccss.

ksheedlo avatar ksheedlo commented on June 21, 2024

A flexible and reusable css component is one which does not only exist on a specific part of the DOM tree or require the use of certain element types. If necessary, extra HTML elements should be used to make a component reusable and flexible.

"flexible and reusable" <-> "reusable and flexible" Pick one modifier and stick with it. Which one is more important, "reusable" or "flexible"?

It's like if I'm telling a story about my commute to work and I mention stopping to pick up a delicious cup of coffee. I don't talk about my delicious and piping hot and large and mildly spicy with a hint of cayenne pepper cup of espresso, unless that's the point of the story or I'm trying to be artistic! Otherwise it's kind of annoying.

from ccss.

ksheedlo avatar ksheedlo commented on June 21, 2024

Definition from wikipedia: a highly composable system provides recombinant components that can be selected and assembled in various combinations to satisfy specific user requirements.

I already know from the header "Composable" what you're going to be talking about in this section. If you think it's important that people know this definition is from wikipedia, maybe add it to your credits at the end. Seeing "Definition from wikipedia" is really jarring and makes the article feel less like a narrative. Instead:

A composable system provides recombinant components that can be selected and assembled in various combinations to satisfy specific user requirements.

Notice also I dropped "highly", which felt unnecessary in this context.

from ccss.

ksheedlo avatar ksheedlo commented on June 21, 2024

Most people assume CSS is self-explanatory which is not the case most times.

This is an excellent opportunity to use some voice.

Most people assume CSS is self-explanatory. In fact, this is usually not the case!

You could also add an example of how you document CSS in this paragraph, either in a following code block or by simply describing what you normally do as far as CSS documentation.

from ccss.

ksheedlo avatar ksheedlo commented on June 21, 2024

Directory Structure section

I'm a little iffy on this. I feel directory structure largely depends on taste and what works given your current tooling. Even Angular, one of the most opinionated JS frameworks you can use, doesn't make a strong recommendation as far as directory structure.

I feel this would be better presented as an example directory structure, or not at all. It should not use a prescriptive voice.

from ccss.

ksheedlo avatar ksheedlo commented on June 21, 2024

I like this a lot.

All components follow the modified BEM naming convention in combination with the CamelCase. This got me great wins in making other team members start following BEM style syntax. It also avoided a lot of confusion when moving away from using the typical BEM style with -, --, & __ symbols which generate class names like module-name__child-name--modifier-name!

The only thing is I would change "making other team members start following" to "encouraging other team members to follow". I know Component CSS is an "eat your vegetables" kind of proposition, but we should think about how it comes across as we're promoting the idea.

from ccss.

sathify avatar sathify commented on June 21, 2024

@ksheedlo Thanks for suggestions and PR.

from ccss.

Related Issues (4)

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.