Adjust styling of variant switcher for not created variant (#8511)
This commit is contained in:
committed by
GitHub
parent
d1d50f2ff4
commit
18ccbb70fd
@@ -164,163 +164,7 @@ input.umb-editor-header__name-input:disabled {
|
||||
}
|
||||
}
|
||||
|
||||
/* variant switcher */
|
||||
.umb-variant-switcher__toggle {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
margin: 1px 1px;
|
||||
right: 0;
|
||||
height: 30px;
|
||||
text-decoration: none !important;
|
||||
font-size: 13px;
|
||||
color: @ui-action-discreet-type;
|
||||
background: transparent;
|
||||
border: none;
|
||||
|
||||
max-width: 50%;
|
||||
white-space: nowrap;
|
||||
|
||||
user-select: none;
|
||||
|
||||
span {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
button.umb-variant-switcher__toggle {
|
||||
transition: color 0.2s ease-in-out;
|
||||
&:hover {
|
||||
//background-color: @gray-10;
|
||||
color: @ui-action-discreet-type-hover;
|
||||
.umb-variant-switcher__expand {
|
||||
color: @ui-action-discreet-type-hover;
|
||||
}
|
||||
}
|
||||
|
||||
&.--error {
|
||||
&::before {
|
||||
content: '!';
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: -10px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
background-color: @errorBackground;
|
||||
color: @errorText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.umb-variant-switcher__expand {
|
||||
color: @ui-action-discreet-type;
|
||||
margin-left: 5px;
|
||||
margin-right: -5px;
|
||||
transition: color 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid @gray-9;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item.--current {
|
||||
color: @ui-light-active-type;
|
||||
}
|
||||
.umb-variant-switcher__item.--current .umb-variant-switcher__name-wrapper {
|
||||
border-left: 4px solid @ui-active;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item:hover {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item.--not-allowed:not(.--current) .umb-variant-switcher__name-wrapper:hover {
|
||||
//background-color: @white !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item:hover .umb-variant-switcher__split-view {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item.--error {
|
||||
.umb-variant-switcher__name {
|
||||
color: @red;
|
||||
&::after {
|
||||
content: '!';
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 5px;
|
||||
top: -3px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 7px;
|
||||
font-size: 8px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
background-color: @errorBackground;
|
||||
color: @errorText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.umb-variant-switcher__name-wrapper {
|
||||
font-size: 14px;
|
||||
flex: 1;
|
||||
cursor: pointer;
|
||||
padding-top: 6px !important;
|
||||
padding-bottom: 6px !important;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
border-left: 2px solid transparent;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__name {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__state {
|
||||
font-size: 13px;
|
||||
color: @gray-4;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__split-view {
|
||||
font-size: 13px;
|
||||
display: none;
|
||||
padding: 16px 20px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background-color: @white;
|
||||
|
||||
&:hover {
|
||||
background-color: @ui-option-hover;
|
||||
color: @ui-option-type-hover;
|
||||
}
|
||||
}
|
||||
|
||||
// container
|
||||
|
||||
.umb-editor-container {
|
||||
position: absolute;
|
||||
top: @editorHeaderHeight;
|
||||
|
||||
@@ -77,6 +77,7 @@ button.umb-variant-switcher__toggle {
|
||||
align-items: center;
|
||||
border-bottom: 1px solid @gray-9;
|
||||
position: relative;
|
||||
|
||||
.umb-variant-switcher__name-wrapper:hover {
|
||||
.umb-variant-switcher__name {
|
||||
color: @blueMid;
|
||||
@@ -86,6 +87,11 @@ button.umb-variant-switcher__toggle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item.--not-allowed:not(.--current) .umb-variant-switcher__name-wrapper:hover {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item.--state-notCreated:not(.--active) {
|
||||
.umb-variant-switcher__name-wrapper::before {
|
||||
content: "+";
|
||||
@@ -93,38 +99,44 @@ button.umb-variant-switcher__toggle {
|
||||
float: left;
|
||||
font-size: 15px;
|
||||
font-weight: 900;
|
||||
padding: 8px 16px 8px 6px;
|
||||
padding: 8px 12px 8px 0;
|
||||
color: @gray-5;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item-expand-button + .umb-variant-switcher__name-wrapper::before {
|
||||
padding: 8px 16px 8px 20px;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__name {
|
||||
color: @gray-5;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__state {
|
||||
color: @gray-6;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__name-wrapper::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
border: 1px dashed @gray-9;
|
||||
top: 7px;
|
||||
bottom: 7px;
|
||||
left: 7px;
|
||||
right: 7px;
|
||||
border-radius: 3px;
|
||||
border: 2px dashed @gray-9;
|
||||
margin: 2px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
.umb-variant-switcher__name-wrapper:hover {
|
||||
&::before {
|
||||
color: @blueMid;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__name {
|
||||
color: @blueMid;
|
||||
}
|
||||
|
||||
.umb-variant-switcher__state {
|
||||
color: @blueMid;
|
||||
}
|
||||
@@ -170,8 +182,11 @@ button.umb-variant-switcher__toggle {
|
||||
}
|
||||
|
||||
.umb-variant-switcher__item.--current {
|
||||
//color: @ui-light-active-type;
|
||||
color: @ui-light-active-type;
|
||||
//background-color: @pinkExtraLight;
|
||||
.umb-variant-switcher__name-wrapper {
|
||||
border-left: 4px solid @ui-active;
|
||||
}
|
||||
.umb-variant-switcher__name {
|
||||
//color: @ui-light-active-type;
|
||||
font-weight: 700;
|
||||
@@ -203,7 +218,7 @@ button.umb-variant-switcher__toggle {
|
||||
.umb-variant-switcher__item:focus-within .umb-variant-switcher__split-view,
|
||||
.umb-variant-switcher__item:hover .umb-variant-switcher__split-view,
|
||||
.umb-variant-switcher__split-view:focus {
|
||||
display: block;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -237,7 +252,10 @@ button.umb-variant-switcher__toggle {
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
padding-top: 6px !important;
|
||||
padding-bottom: 6px !important;
|
||||
}
|
||||
|
||||
.dropdown-menu>li {
|
||||
> .umb-variant-switcher__name-wrapper {
|
||||
padding-top: 10px;
|
||||
@@ -264,7 +282,7 @@ button.umb-variant-switcher__toggle {
|
||||
.umb-variant-switcher__split-view {
|
||||
font-size: 12px;
|
||||
display: none;
|
||||
padding: 20px 20px;
|
||||
padding: 16px 20px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
@@ -277,7 +295,6 @@ button.umb-variant-switcher__toggle {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.umb-variant-switcher__sub-variants {
|
||||
|
||||
position: relative;
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<button type="button" ng-if="entry.subVariants && entry.subVariants.length > 0" class="umb-variant-switcher__item-expand-button umb-outline" ng-click="entry.open = !entry.open">
|
||||
<i class="icon {{entry.open ? 'icon-navigation-down' : 'icon-navigation-right'}}"></i>
|
||||
</button>
|
||||
<button type="button" class="umb-variant-switcher__name-wrapper umb-outline" ng-click="selectVariant($event, entry.variant)" prevent-default>
|
||||
<button type="button" class="umb-variant-switcher__name-wrapper umb-outline" ng-click="selectVariant($event, entry.variant)">
|
||||
<span class="umb-variant-switcher__name" ng-bind="entry.variant.displayName"></span>
|
||||
<umb-variant-state variant="entry.variant" class="umb-variant-switcher__state"></umb-variant-state>
|
||||
</button>
|
||||
@@ -74,7 +74,7 @@
|
||||
class="umb-variant-switcher__item"
|
||||
ng-class="{'--current': subVariant === editor.content, '--active': subVariant.active && vm.dropdownOpen, '--error': subVariant.active !== true && subVariant.hasError, '--state-notCreated':subVariant.state==='NotCreated', '--state-draft':subVariant.state==='Draft'}"
|
||||
>
|
||||
<button type="button" class="umb-variant-switcher__name-wrapper umb-outline" ng-click="selectVariant($event, subVariant)" prevent-default>
|
||||
<button type="button" class="umb-variant-switcher__name-wrapper umb-outline" ng-click="selectVariant($event, subVariant)">
|
||||
<span class="umb-variant-switcher__name" ng-bind="subVariant.segment"></span>
|
||||
<umb-variant-state variant="subVariant" class="umb-variant-switcher__state"></umb-variant-state>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user