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

IBX-5131: Add status badge #707

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
use mixin
  • Loading branch information
tischsoic committed Feb 20, 2023
commit 13fd178ea1338080032b1f1791162efa6553c7eb
90 changes: 22 additions & 68 deletions src/bundle/Resources/public/scss/_badges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,105 +11,59 @@

&--status {
position: relative;
padding-left: 16px;
padding-top: 3px;
padding-bottom: 3px;
border-width: 1px;
padding-left: calculateRem(16px);
padding-top: calculateRem(3px);
padding-bottom: calculateRem(3px);
border-width: calculateRem(1px);
border-style: solid;

&::before {
content: '';
position: absolute;
left: 8px;
width: 4px;
height: 4px;
left: calculateRem(8px);
width: calculateRem(4px);
height: calculateRem(4px);
border-radius: 50%;
top: 50%;
transform: translateY(-50%);
}
}

&--primary {
color: $ibexa-color-primary;
background-color: $ibexa-color-primary-200;
border-color: $ibexa-color-primary;
@mixin version-properties($color, $background-color) {
color: $color;
background-color: $background-color;
border-color: $color;

.ibexa-icon {
fill: $ibexa-color-primary;
fill: $color;
}

&::before {
background-color: $ibexa-color-primary;
background-color: $color;
}
}

&--secondary {
color: $ibexa-color-dark;
background-color: $ibexa-color-light-500;
border-color: $ibexa-color-dark;

.ibexa-icon {
fill: $ibexa-color-dark;
}
&--primary {
@include version-properties($ibexa-color-primary, $ibexa-color-primary-200);
}

&::before {
background-color: $ibexa-color-dark;
}
&--secondary {
@include version-properties($ibexa-color-dark, $ibexa-color-light-500);
}

&--info {
color: $ibexa-color-info;
background-color: $ibexa-color-info-200;
border-color: $ibexa-color-info;

.ibexa-icon {
fill: $ibexa-color-info;
}

&::before {
background-color: $ibexa-color-info;
}
@include version-properties($ibexa-color-info, $ibexa-color-info-200);
}

&--danger {
color: $ibexa-color-danger;
background-color: $ibexa-color-danger-200;
border-color: $ibexa-color-danger;

.ibexa-icon {
fill: $ibexa-color-danger;
}

&::before {
background-color: $ibexa-color-danger;
}
@include version-properties($ibexa-color-danger, $ibexa-color-danger-200);
}

&--success {
color: $ibexa-color-success;
background-color: $ibexa-color-success-200;
border-color: $ibexa-color-success;

.ibexa-icon {
fill: $ibexa-color-success;
}

&::before {
background-color: $ibexa-color-success;
}
@include version-properties($ibexa-color-success, $ibexa-color-success-200);
}

&--complementary {
color: $ibexa-color-complementary;
background-color: $ibexa-color-complementary-200;
border-color: $ibexa-color-complementary;

.ibexa-icon {
fill: $ibexa-color-complementary;
}

&::before {
background-color: $ibexa-color-complementary;
}
@include version-properties($ibexa-color-complementary, $ibexa-color-complementary-200);
}
}