mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
SCSS: Fix field badge display being in 2 lines
This commit is contained in:
@@ -7,6 +7,8 @@ $ibo-field-badge--margin: 0 !default;
|
|||||||
$ibo-field-badge--padding: 4px 10px !default;
|
$ibo-field-badge--padding: 4px 10px !default;
|
||||||
$ibo-field-badge--border-radius: $ibo-border-radius-300 !default;
|
$ibo-field-badge--border-radius: $ibo-border-radius-300 !default;
|
||||||
|
|
||||||
|
$ibo-field-badge--label--spacing-x: 0.5rem !default;
|
||||||
|
|
||||||
.ibo-field-badge {
|
.ibo-field-badge {
|
||||||
@extend %ibo-font-ral-med-100;
|
@extend %ibo-font-ral-med-100;
|
||||||
|
|
||||||
@@ -14,4 +16,8 @@ $ibo-field-badge--border-radius: $ibo-border-radius-300 !default;
|
|||||||
padding: $ibo-field-badge--padding;
|
padding: $ibo-field-badge--padding;
|
||||||
border-radius: $ibo-field-badge--border-radius;
|
border-radius: $ibo-field-badge--border-radius;
|
||||||
display: inline;
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ibo-field-badge--decoration + .ibo-field-badge--label {
|
||||||
|
margin-left: $ibo-field-badge--label--spacing-x;
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -34,9 +34,9 @@ class FieldBadgeUIBlockFactory extends AbstractUIBlockFactory
|
|||||||
$oBadge = new FieldBadge(null, $aCSSClasses);
|
$oBadge = new FieldBadge(null, $aCSSClasses);
|
||||||
$sDecorationClasses = $oStyle->GetDecorationClasses();
|
$sDecorationClasses = $oStyle->GetDecorationClasses();
|
||||||
if (!is_null($sDecorationClasses) && !empty($sDecorationClasses)) {
|
if (!is_null($sDecorationClasses) && !empty($sDecorationClasses)) {
|
||||||
$oBadge->AddHtml("<i class=\"$sDecorationClasses\"></i> ");
|
$oBadge->AddHtml("<span class=\"ibo-field-badge--decoration\"><i class=\"$sDecorationClasses\"></i></span>");
|
||||||
}
|
}
|
||||||
$oBadge->AddHtml("<span>$sValue</span>");
|
$oBadge->AddHtml("<span class=\"ibo-field-badge--label\">$sValue</span>");
|
||||||
// Add custom style
|
// Add custom style
|
||||||
// TODO 3.0 To be removed when compilation supports generated CSS
|
// TODO 3.0 To be removed when compilation supports generated CSS
|
||||||
$oBadge->AddHtml(<<<HTML
|
$oBadge->AddHtml(<<<HTML
|
||||||
|
|||||||
Reference in New Issue
Block a user