Comments (5)
We've just begun looking at hifi component designs which is where something like this will reveal itself. Obviously in Sketch everything is in pixels, so whether we use relative units or not is purely a development decision I think.
If we use em, I think the most important thing to note right now is that we're using a base font-size of 16px.
For padding etc, we might consider setting variables based on the base font size and some kind of ratio.
$font_size: 16px;
$ratio: 1.2;
$padding: $font_size * $ratio;
$less_padding: $font_size / $ratio;
$more_padding: $font_size * $ratio * $ratio;
Just an idea.
from woocommerce-admin.
As of #86, we now have a $spacing
sass variable, so that can be used like padding: $spacing * 2;
Currently it's set to 16px, we can swap & update the ActivityCard styles if needed once we have a final design & know what those values really should be.
from woocommerce-admin.
@kellychoffman @jameskoster @LevinMedia Do you have a consistent "rhythm" to the padding? We could define a base of say 8px
or 20px
and use multiples from there? Do you have opinions on the rem/em idea?
from woocommerce-admin.
Good question. Calypso had an 8px grid. Gutenberg is based on a 24px icon size and uses 6,8,12 pixel increments for type,padding,margin,etc.
As far as rem v. em.... Gutenberg doesn't use them because: themes. But we don't have to worry about that here. From what I understand, em is based on parent element font size and rem is based on root font size. So if we don't want something like a link or icon to resize with the text size, we'd use rem.
I'm open to using them. FWIW, it looks like Jetpack is using rems - @MichaelArestad wrote a basic sass function that does the math for you: https://github.com/Automattic/jetpack/blob/master/_inc/client/scss/functions/rem.scss
from woocommerce-admin.
Closing this in favor of #119
from woocommerce-admin.
Related Issues (20)
- [GlobalStep - 3.3.0-beta 1] "Setup additional payment providers" is shown under "Things to do next" without setting up WC Pay on "Woocommerce > Home" page. HOT 2
- Untranslated dates in New Sales Record notice HOT 1
- Fix some race conditions in WCA Install
- Run run_on_woocommerce_admin_updated as a scheduled action
- Update all linting, testing, `@types/*` DevDependencies
- Woo Navigation: Home item displayed under extensions
- Make packages work with pnpm nx install {package}
- `WC_Tests_API_Reports_Import::test_cancel_import` failed with woocommerce 6.3.0
- Industry tab in setup wizard not clickable after going back
- PHP Fatal error when running `wc_admin_daily` job
- Change image references to woocommerce
- PHP Notice when the `Purchase` task is visible
- Core `API tests` failing
- `ERROR: unable to select packages` in `pnpm run test:php`
- Dependency Dashboard
- Additional payments task is shown when set up payments is displayed in main task list HOT 1
- create-wc-extension ES Module Errors HOT 1
- Replace the `date_created` column name with a class property in the analytics DataStore HOT 1
- With WooCommerce Payments multicurrency functionality, numbers in the Revenue tab can be incorrect HOT 1
- Dependency on unsupported version of pnpm 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 woocommerce-admin.