attach-css icon indicating copy to clipboard operation
attach-css copied to clipboard

css-module's :global syntax?

Open yoshuawuyts opened this issue 10 years ago • 1 comments

I initially rejected :global, but after having read an article and seen the css-modules org 'm changing my mind. Is the :global syntax something that should be adopted, and what are the steps to do so?

example

.foo {
  font-size: 2rem;
}

/* exported globally */
:global .foo {
  color: green;
}

yoshuawuyts avatar May 27 '15 21:05 yoshuawuyts

I'm still on the fence about it. I understand that it's necessary to define things globally ie @keyframes but not sure if A) the lib author should have end control over that or B) that we need custom syntax for it.

Currently I'm experimenting with some "communitive CSS" ideas. Where css either gets attached to a vtree or mapped to one. Which produces an optimized stylesheet for that vtree and a streamlined interface for connecting up large amounts of elements.

I'm hoping to address global declarations using that. But if those experiments fail, I'm :+1: for adopting css-modules style syntax.

shama avatar May 28 '15 01:05 shama