Comments (2)
Not sure what the benefit of this would be. Couldn't you just add a global css file with simple reset for box-sizing?
from ui.
@rob-balfre You can definitely do that. Coming from css-in-js, sometimes you don't have a root style sheet or at least its existence doesn't persist in my mental model.
I think there is some value to providing a set of sane defaults as a component. When I used Bootstrap, I would think of it as "having Reboot at the root" (and it included Reboot). Keeping the idea that a reset does exist in the programmer's mental model might be easier if the reset is in the component tree.
Box
also exists as a layout primitive in grommet. It has lots of props related to aligning content.
I guess my thoughts there mostly relate to sharing e.g. a css variable for padding ala styled-system - which incidentally creates shows Box as:
import { typography, space, color } from 'styled-system'
const Box = styled('div')(
typography,
space,
color
)
I'm not sure if this is something you're interested in adding or not. I think having a standardize "system" of variables would be great for component development. Tachyons et all aren't fully geared towards "just" variables...
from ui.
Related Issues (7)
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 ui.