Comments (5)
Maybe the <StyleProvider>
introduced in #158 should be responsible for outputting the <link>
tags as well? And maybe it could take a baseURL just in case folks aren't comfortable with linking to unpkg.com
?
from react.
Okay, after hacking on this in #238 so that we can use Next's sass loader, I have some better-formed opinions on how this should be done. Here's a proposed plan:
- Introduce a
<BaseCSS />
component that includes primer-base and whichever other styles we need to support existing components. - As we factor out Primer CSS from components, we remove the imports and npm dependencies. (For instance,
primer-labels
goes away when we - When we're done refactoring components, all that should remain is primer-base.
- Figure out how to implement style encapsulation correctly.
- Once styles are properly encapsulated and
<BaseCSS />
is no longer needed, we make that component rendernull
. - Remove the
<BaseCSS />
component in the next major release.
What do you think, @broccolini @emplums @jonrohan?
from react.
Curious what you were thinking for Figure out how to implement style encapsulation correctly.
? Does "styles are properly encapsulated" === using all CSS in JS or are you thinking about something else?
from react.
@emplums I honestly don't know. Like, should all our components have the default font-family
and line-height
? I don't know how total style encapsulation is really possible without doing that. Or do we add a component that inlines the base styles with <style scoped>
? /cc @broccolini
from react.
Done in #260
from react.
Related Issues (20)
- ActionList.Item danger variant changes color on hover HOT 4
- UnderlineNav items collapses into the more menu then it is wrapped with a flex
- ActionMenu.Anchor doesn't accept `id` param and doesn't pass up child id either HOT 1
- Release Tracking
- Broken link to getting-started guide from home page
- `SelectPanel` should compare Objects based on `key` or `id` instead of the Objects themselves HOT 2
- ActionList.Item doesn't break long words and causes overflows
- Button "Invisible" loses accent `color` when using a `leadingVisual` HOT 1
- `colorSchemes` calculation slows down initial load
- IconButton is using color `fg.default` instead of `fg.muted` HOT 2
- Simplify custom-element react bindings with util
- PageLayout doesn't extend the sidebar divider when extending the height.
- Deprecate and remove the input `contrast` prop HOT 3
- Disabled inputs look the same as enabled inputs in dark themes
- RelativeTime should render some kind of date in SSR HOT 1
- Dialog: Focus shifts unexpectedly on opening HOT 2
- NavList.Item active state should show up as bold, but doesn't. HOT 2
- Sub-component pattern cause error when used in React Server Components HOT 1
- Get ActionBar axe clean
- Type checking is too slow HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.