Skip to content
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

[border_css_util] implement css helper class #10057

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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";
Loading