Skip to content

Commit

Permalink
[border_css_util] implement css helper class
Browse files Browse the repository at this point in the history
Signed-off-by: Thorsten Scherler <[email protected]>
  • Loading branch information
scherler committed Dec 13, 2024
1 parent 7020e80 commit ea633ff
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
61 changes: 61 additions & 0 deletions src/main/scss/abstracts/_border.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@use "theme";

$positions: (
t: "top",
r: "right",
b: "bottom",
l: "left"
);
$styles: (
solid: "solid",
dashed: "dashed",
dotted: "dotted",
double: "double",
hidden: "hidden",
none: "none"
);
$base-unit: 1px;
$borderStyle: solid;
$borderColor: black;
.jenkins-border {
--border-style: #{$borderStyle};
--border-color: #{$borderColor};
border: #{$base-unit} var(--border-style) var(--border-color);

@each $position, $pos in $positions {
&-#{$position} {
border: 0 var(--border-style) var(--border-color);
border-#{$pos}-width: $base-unit !important;
border-#{$pos}-style: var(--border-style, #{$borderStyle});
border-#{$pos}-color: var(--border-color, #{$borderColor});
@for $size from 0 through 15 {
&-#{$size} {
border: 0 var(--border-style, #{$borderStyle}) var(--border-color, #{$borderColor});
border-#{$pos}-width: $size * $base-unit !important;
border-#{$pos}-style: var(--border-style, #{$borderStyle});
border-#{$pos}-color: var(--border-color, #{$borderColor});
}
}
}
}
@for $size from 0 through 15 {
&-#{$size} {
border: 0 var(--border-style, #{$borderStyle}) var(--border-color, #{$borderColor});
border-width: $size * $base-unit !important;
}
}
@each $key, $value in theme.$colors {
&-#{$key} {
border: 0 var(--border-style, #{$borderStyle}) var(--border-color, #{$borderColor});
--border-color: #{$value};
border-color: var(--border-color) !important;
}
}
@each $key, $value in $styles {
&-#{$key} {
border: 0 var(--border-style, #{$borderStyle}) var(--border-color, #{$borderColor});
--border-style: #{$value};
border-style: var(--border-style) !important;
}
}
}
1 change: 1 addition & 0 deletions src/main/scss/abstracts/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@use "border";
@use "colors";
@use "theme";

0 comments on commit ea633ff

Please sign in to comment.