Giter Site home page Giter Site logo

Comments (5)

jameskoster avatar jameskoster commented on June 24, 2024 2

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.

ryelle avatar ryelle commented on June 24, 2024 2

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.

ryelle avatar ryelle commented on June 24, 2024

@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.

kellychoffman avatar kellychoffman commented on June 24, 2024

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.

ryelle avatar ryelle commented on June 24, 2024

Closing this in favor of #119

from woocommerce-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.