-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor button styles #2878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Refactor button styles #2878
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| @import 'pattern-library/core/pattern-library/headers'; | ||
|
|
||
| // Styles for CMS-authored markup rendered by the adjacent <RawHTML> component, | ||
| // whose container is tagged `.cms-content`. Buttons authored in CMS rich-text | ||
| // render through it. The base button plus the variant classes editors use | ||
| // (`btn-orange`, `cta`, `btn-cyan`, `btn-gold`, `btn-large`) are built from the | ||
| // pattern-library button mixins and scoped to that container, so they apply | ||
| // only to editor content and never globally. | ||
| .cms-content { | ||
| button, | ||
| .btn { | ||
| @include button(); | ||
| } | ||
|
|
||
| .btn-large { | ||
| padding: 2.5rem; | ||
| } | ||
|
|
||
| // Call-to-action buttons generally have this style | ||
| .cta > .btn { | ||
| padding: 1.5rem 2rem; | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| .cta > .btn, | ||
| .btn-orange { | ||
| @include button-type-specific(primary); | ||
| } | ||
|
|
||
| .btn-cyan { | ||
| background-color: os-color(light-blue); | ||
| border: 0; | ||
| color: ui-color(white); | ||
| } | ||
|
|
||
| .btn-gold { | ||
| background-color: os-color(gold); | ||
| border: 0; | ||
| color: ui-color(white); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,8 @@ | |
| grid-row-gap: 2rem; | ||
|
|
||
| [role="button"] { | ||
| @include focus-indicator(); | ||
|
|
||
| cursor: pointer; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,8 @@ | |
| padding: 0 1rem; | ||
|
|
||
| .put-away { | ||
| @include button-reset(); | ||
|
|
||
| font-size: inherit; | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,8 @@ | |
| } | ||
|
|
||
| .put-away { | ||
| @include button-reset(); | ||
|
|
||
| align-items: center; | ||
| align-self: flex-end; | ||
| display: flex; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,6 +73,8 @@ | |
| } | ||
|
|
||
| button { | ||
| @include button-reset(); | ||
|
|
||
| background-color: transparent; | ||
| color: inherit; | ||
| display: inline; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,10 @@ | |
| .url { | ||
| padding: 0.5rem 0 0.5rem 1rem; | ||
| } | ||
|
|
||
| button { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These (/ally-logos, the copy buttons) lost padding and foreground/background color. |
||
| @include button-reset(); | ||
| } | ||
| } | ||
|
|
||
| .boxed.smaller-icon img { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,4 +29,10 @@ | |
| .primary { | ||
| @extend %primary; | ||
| } | ||
|
|
||
| // CTA buttons are large and uppercased. | ||
| .btn { | ||
| padding: 1.5rem 2rem; | ||
| text-transform: uppercase; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "Let us know" button was previously not uppercase. Is this a design change or the Assignable page? |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,6 +72,10 @@ | |
| } | ||
| } | ||
|
|
||
| .show-toc { | ||
| @include focus-indicator(); | ||
| } | ||
|
|
||
| .options { | ||
| display: flex; | ||
| flex-direction: column; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,8 @@ | |
| } | ||
|
|
||
| button { | ||
| @include button-reset(); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again the next two lines could be removed |
||
| appearance: none; | ||
| background-color: transparent; | ||
| color: text-color(normal); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The next two lines can be removed, as they're redundant with button-reset now, right?