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)
- Consider modern `moduleResolution` HOT 1
- Data Table Pagination - when the page numbers in the 1000s the page numbers are unreadable HOT 1
- Dockerize The entire application HOT 1
- [ActionMenu.Button] onClick doesn't function HOT 9
- "npm run setup" doesn't exist in your package.json HOT 1
- Inline `ActionList.Description` can result in horizontal overflow HOT 2
- <UnderlineNav.Item /> without counter shows loading indicator HOT 2
- Release Tracking
- `<AnchoredOverlay>` needs to be upgraded to `popover`
- Roll out tooltip in our primer/react components that uses IconButton under the hood
- test
- Release Tracking
- containsCurrentItem State Not Reset in NavList Component. HOT 1
- SelectPanel bug when we have static items list is inside same component
- Tooltip is misplaced when it is rendered on a dialog
- Add support for `className` to `<AnchoredOverlay>` HOT 3
- Release Tracking
- Dialog: Support a responsive value for `isOpen` HOT 1
- Confusion between Dialog and DialogV1
- Proposal: Keybinding hints in tooltips / icon buttons 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.