mozilla / payments

The root repository for all things Payments at Mozilla.
Other
9 stars 9 forks source link

Provide UX specification for existing widgets, layouts + fonts etc. #94

Closed muffinresearch closed 9 years ago

muffinresearch commented 9 years ago

To be able to more precisely style all our components and layouts we could use a guide with the dimensions for all the layouts, widgets and fonts etc.

Questions to be answered:

This could be added to the styleguide or a separate document (I could then take that and implement the changes and represent any useful info in the styleguide if we go the latter route).

@brampitoyo Let me know if you'd like to discuss it further or have questions - I'm sure we could work out some point to sync up if it would help.

muffinresearch commented 9 years ago

@brampitoyo hi - would you have any bandwidth to look at this?

brampitoyo commented 9 years ago

Yes. I most certainly do.

I’m going to work on this today, and when you have more questions, we can talk about it tomorrow morning (your evening) – if you’re keen.

brampitoyo commented 9 years ago

Font size sets

What size should the fonts be? Where should different font familys, weights and sizes be used

I’ve simplified the font sizes down to five sets:

We can reuse these five sets for the management interface,

font-family designation

Colour palette

What are the precise colours things should be

I think you’ve followed FxA’s colour palette pretty well already, from border to text to background.

There are just three colours that we use, that aren’t present in FxA:

Layout breakpoints

How should things change at varying widths

I have a responsive stylesheet for the pay interface that’s inspired by FxA’s. I think we should be able to reuse this for the management interface (although the management interface would be wider).

Wide

fxa-payments-modal-wide

Medium

fxa-payments-modal-medium

Narrow

fxa-payments-modal-narrow

CSS elements

CSS values

Should the padding around a button be proportional to the font-size or fixed?

As far as I know, FxA styleguide made button spacing fixed, but I’ve made it proportional in this table.

Element Wide Medium Narrow
modal width 420px 360px 100%
height 100%
min-height 420px 300px
border-radius 4px 2px 0px
box-shadow 0px 1px 5px rgba(0,0,0,0.5) same as wide
<main> padding 25px 40px 40px 8px 20px 20px 8px 0px 20px
margin 85px auto 0px (slide down elements to accommodate vendor logo, then center align it horizontally)
small text font-size 14px same same
p text font-size 18px 14px same as medium
line-height 1.5 same same
h1 font-size 24px 20px same as medium
font-weight 200 same same
h1 .product .title padding-bottom .5em .45em same as medium
large text font-size 32px 24px same as medium
font-weight 200 same same
large text for .product currency and .product cent font-weight 400 same same
position relative same same
bottom .5em same same
margin 0 .2em 0 .1em same as medium
large text for close "×" button color #424F59 same same
font-size 32px same same
line-height 1 same same
padding 0 same same
position absolute same same
right 9px same same
extra large text font-size 78px 58px same as medium
font-weight 200 same same
extra large text for .product .price margin-bottom .25em same same
input border-radius 4px 2px same as medium
font-size 18px 16px same as medium
height 45px 40px same as medium
padding 0 20px 0 15px same as medium
margin 12.5px 0 same same
button font-size 24px 20px 18px
height 63px 44px 41px
line-height 1 same same
margin .83em 0 .75em 0 .55em 0
vendor logo width & height 85px 55px same as medium
top -42.5px -27.5px 27.5px (move vendor logo down to be inside modal area)
andymckay commented 9 years ago

@brampitoyo would it possible to check this into the documentation (and check its all up to date)?

brampitoyo commented 9 years ago

What’s the best way to check this into the documentation?

Checking in as a bunch of texts on a table doesn’t look great or helpful. Is there a way where I can actually modify the CSS and have the change be reflected on the styleguide?

(But maybe we do want a written account of the styles).

muffinresearch commented 9 years ago

@brampitoyo see https://github.com/mozilla/payments-ui/pull/429

brampitoyo commented 9 years ago

Fixed by @muffinresearch at mozilla/payments-ui#429.