File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @cloudfour/patterns ' : patch
3+ ---
4+
5+ Prevent Buttons from feeling disconnected from Input Groups when ` :hover ` or ` :active ` states are applied
Original file line number Diff line number Diff line change 9090 /* *
9191 * Transform, opacity and filter changes are performant and will work across
9292 * many more stylistic modifiers than specific color shifts.
93+ *
94+ * We optionally support custom properties to allow the amount of scaling to
95+ * be adjusted by other patterns. For example, an Input Group might disable
96+ * the scaling so the button always appeared joined to adjacent elements.
9397 */
9498
9599 & :hover {
96100 filter : brightness (brightness .$control-brighten );
97- transform : scale (scale .$effect-grow );
101+ transform : scale (var ( -- scale-effect-grow , #{ scale .$effect-grow } ) );
98102 }
99103
100104 & :active {
101105 filter : brightness (brightness .$control-dim );
102- transform : scale (scale .$effect-shrink );
106+ transform : scale (var ( -- scale-effect-shrink , #{ scale .$effect-shrink } ) );
103107 }
104108
105109 & :disabled ,
Original file line number Diff line number Diff line change 11@use ' ../../compiled/tokens/scss/size' ;
22
33.o-input-group {
4+ // Prevent button effects from appearing disconnected from the input group
5+ --scale-effect-grow : 1 ;
6+ --scale-effect-shrink : 1 ;
47 display : flex ;
58
69 // Keeps focus styles from being cut off by adjacent, un-focused elements
You can’t perform that action at this time.
0 commit comments