Skip to content

Commit

Permalink
Move some form styles to base.scss (#2327)
Browse files Browse the repository at this point in the history
* Move fieldset + label styles to base.scss

* Create giant-boxes-vanish.md

* Move ::placeholder
  • Loading branch information
simurai committed Dec 2, 2022
1 parent f0e6eab commit 8cf13e9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-boxes-vanish.md
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Move `fieldset` + `label` styles to `base.scss`
16 changes: 16 additions & 0 deletions src/base/base.scss
Expand Up @@ -34,6 +34,22 @@ strong {
font-weight: $font-weight-bold;
}

fieldset {
padding: 0;
margin: 0;
border: 0;
}

label {
font-weight: $font-weight-bold;
}

// Custom styling for HTML5 validation bubbles (WebKit only)
::placeholder {
color: var(--color-fg-subtle);
opacity: 1; // override opacity in normalize.css
}

// Horizontal lines
//
// TODO-MDO: Remove `.rule` from everywhere and replace with `<hr>`s
Expand Down
16 changes: 0 additions & 16 deletions src/forms/form-control.scss
Expand Up @@ -5,16 +5,6 @@
//
// Overrides for common inputs for easier styling.

fieldset {
padding: 0;
margin: 0;
border: 0;
}

label {
font-weight: $font-weight-bold;
}

.form-control,
.form-select {
// stylelint-disable-next-line primer/spacing
Expand Down Expand Up @@ -96,12 +86,6 @@ textarea.form-control {
}
}

// Custom styling for HTML5 validation bubbles (WebKit only)
::placeholder {
color: var(--color-fg-subtle);
opacity: 1; // override opacity in normalize.css
}

// Mini inputs, to match .minibutton
.input-sm {
min-height: $size-4;
Expand Down

0 comments on commit 8cf13e9

Please sign in to comment.