Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS modules roadmap #1335

Closed
jasonrhodes opened this issue Nov 29, 2018 · 5 comments
Closed

CSS modules roadmap #1335

jasonrhodes opened this issue Nov 29, 2018 · 5 comments
Labels

Comments

@jasonrhodes
Copy link
Member

I'd love to help take some of the lead on plotting a course for how this would work, based on what we did at my previous job with React, a design component library, and scoped CSS modules. To get that conversation started, can we use this issue to map out the general requirements for what "CSS" needs to do in EUI? To start:

  • imported EUI components should be styled (users will need to import the main EUI CSS file in their project)
    • if we can eventually find a way to be more clever and have EUI consumers only include CSS for components as they use them, that'd be nice too, especially once we figure out the component tree-shaking stuff
  • CSS files and SCSS files should be generated and available for independent use (do these files need to contain all classes from EUI or just the baseline theme stuff?)

Is that the gist?

@jasonrhodes jasonrhodes changed the title CSS Modules roadmap CSS modules roadmap Nov 29, 2018
@snide
Copy link
Contributor

snide commented Nov 29, 2018

@jasonrhodes I'm on board with this completely. I did some work two weeks ago as an experiment but got blocked by some of the engineery bits. Might make sense to do a quick zoom meeting to go over some ideas.

What I generally want out of the system is...

  1. We need a reset/global css file that ends up in dist independent of the components.
  2. Delivery of the css inside the individual components (and prefixed) is fine. It'd be nice if we could have those files available separately as unprefixed css (for non React users). The later is honestly less important to us these days.
  3. Theming becomes harder. We'll need to figure out how to pass theme context to the components in a dynamic fashion so it knows which css to use.

Goals we're trying to solve.

  1. Still use sass.
  2. Do prefixing to avoid cascade.
  3. Cut the delivery sizes down.

@snide
Copy link
Contributor

snide commented Nov 29, 2018

Also goes without saying that once in EUI, we'd love to bring this to Kibana for many of the same reasons. Right now there is a lot of cascade crazyness down there where people are overwriting EUI base styling.

@thompsongl
Copy link
Contributor

I'll also be very interested in helping out here.

Not at all tied to a given technical implementation (re: css-modules, etc.), but I've been hearing about this lately and wanted to at least give the concept a look: https://github.com/4Catalyzer/astroturf

@MichaelMarcialis
Copy link
Contributor

I'd be interested in helping here as well.

@snide
Copy link
Contributor

snide commented Jul 11, 2019

Closing this in favor of #1656 which is the main tracking issue.

@snide snide closed this as completed Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants