kss icon indicating copy to clipboard operation
kss copied to clipboard

Add attribute support

Open lukeapage opened this issue 8 years ago • 1 comments

from: https://github.com/kss-node/kss-node/issues/52

What if my modifiers are not always class names? E.g. I often use ARIA role attributes as modifiers:

.btn[aria-disabled="true"] { ... }

I did not find any practicable solution to document those.

lukeapage avatar Jul 24 '15 10:07 lukeapage

How about we just use the same notation as in the css attribute selector (https://www.w3schools.com/css/css_attribute_selectors.asp) :

/*
  Component with attributes

  .active - The component when it also has the '.active' class.
  :hover - The hover styling for this component.
  [disabled] - The component with the disabled attribute.
  [disabled]:hover - the component with the disabled attribute when it is hovered.
  [width="500"] - The component with the width attribute that has a value of 500.
  [href^="mailto"] - The component if the href attribute starts with 'mailto'.
*/

Didel avatar Apr 30 '19 13:04 Didel