Skip to content

Commit

Permalink
just inherit border for .field-boolean
Browse files Browse the repository at this point in the history
this allows deeper `border-levels-style` because now the file could be smaller
  • Loading branch information
hesyifei committed Dec 28, 2021
1 parent 2782b0c commit 0c9b05f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ fieldset,
padding: 0 0 0 0.625em;
}
.field-boolean {
border: inherit;
border-radius: inherit;
margin-bottom: 10px;
}
.panel-body {
Expand All @@ -41,8 +43,7 @@ legend {
// https://stackoverflow.com/a/70501895/2603230
@mixin border-levels-style($target, $level: 0) {
fieldset,
.panel-default,
.field-boolean {
.panel-default {
border-color: darken(#ffffff, $level * 5);
border-width: #{$level * 0.7}px;

Expand All @@ -52,7 +53,7 @@ legend {
}
}
// We cannot make the level too deep because otherwise the compiled CSS file will be too large.
@include border-levels-style(6);
@include border-levels-style(10);

.form-group:last-child {
margin-bottom: 2px;
Expand Down

0 comments on commit 0c9b05f

Please sign in to comment.