indiana-university / rivet-source

Indiana University’s design system for web application development
https://rivet.iu.edu
BSD 3-Clause "New" or "Revised" License
54 stars 5 forks source link

Button style enhancements #732

Closed basham closed 7 months ago

basham commented 7 months ago

Notes:

  1. Added white backgrounds to secondary buttons, so contrast is maintained on non-white backgrounds. See similar changes in #728.
  2. Button content should not wrap, because it should be succinct. See similar changes in #728.
  3. Reduced left and right button padding by 2px on each side, so that normal-sized icon buttons are 40 square pixels.
  4. Added rvt-button--medium variant, with 32px height.
  5. Added new medium and small variant examples in the "Button with icons" page.

Questions:

  1. Should buttons use gap for icon button spacing, instead of rvt-m-left-xs? Or does that presume too much about the contents of buttons and how they should be used?
  2. The 2px horizontal padding for small buttons seems insufficient, in order to ensure that small icon buttons remain 24 square pixels. Does this indicate that perhaps the padding should be dynamic, according to if the visible content is an icon only verses icon with label verses just label?
  3. We may want to consider later enhancing icon buttons so that there is a tooltip-style label that shows when it is in focus or on hover. The problem is how do we control the placement of such a thing? The new Popover API would be great, but it is not yet available in Firefox. The upcoming anchor positioning CSS property is still being drafted. So, it would likely require the user to just pre-determine the position (bottom or top) and call it good enough.
  4. Perhaps I should do more exemplar research. But the Adobe Spectrum button has a lot of useful variants.
basham commented 7 months ago

I've made this is PR a draft until the questions are addressed. We may need a meeting to discuss the direction.

levimcg commented 7 months ago

@basham Cool! Thanks for getting this open. Yes, I'd be happen to schedule something face-to-face to chat through some of this before we continue.

basham commented 7 months ago

Reviewed the PR with @levimcg today. Decisions:

basham commented 7 months ago

@levimcg: Ready for review.