Skip to content

Simplifying for new users #26

@burntcustard

Description

@burntcustard

stemCSS looks a bit complicated from the outside. I think there's a few things we can do to help counteract this:

Remove complex top-level CSS rules
This is a lot of text:

/**
 * .c-button
 */

$component: 'button';

#{'.' + $global-components-namespace + $component} {
  @extend %u-mh-auto;
}

This is way more familiar to those with CSS (but maybe not as much SCSS) know-how:

.c-botton {
  @extend %u-mh-auto;
}

Usually (by default) multiline comments are preserved in the CSS output, which can result in a lot of random ".c-my-components". Removing these big component headings means we don't have to add in a solution for getting rid of those!

Remove global namespace variables
This is more-or-less forced by the above simplification, but I think it'd also help with consistency between projects, and reducing the number of things you have to get your head around when first trying out stemCSS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions