Better .pull-right class implementation.

This commit is contained in:
Fabio Manganiello 2023-03-20 01:26:48 +01:00
parent 2b5596820b
commit a011de890b
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
6 changed files with 26 additions and 17 deletions

View file

@ -121,13 +121,19 @@ $label-width: 3em;
.range-labels {
width: 100%;
display: flex;
&.with-label {
width: calc(100% - $label-width);
}
.left {
text-align: left;
}
.right {
@extend .pull-right;
flex-grow: 1;
}
}

View file

@ -8,7 +8,7 @@
:error="error" />
</div>
<div class="col-12 label">
<div class="col-11 label">
<div class="name" v-text="value.name" />
</div>
</div>

View file

@ -13,13 +13,13 @@
</div>
<div class="col-s-4 col-m-3 buttons pull-right">
<span class="value-percent"
v-text="parsedValue"
v-if="parsedValue != null" />
<button @click.stop="collapsed = !collapsed">
<i class="fas"
:class="{'fa-angle-up': !collapsed, 'fa-angle-down': collapsed}" />
</button>
<span class="value-percent"
v-text="parsedValue"
v-if="parsedValue != null" />
</div>
</div>

View file

@ -14,9 +14,9 @@
<div class="col-s-3 col-m-2 pull-right"
v-if="value.value != null">
<span class="value" v-text="value.value" />
<span class="unit" v-text="value.unit"
v-if="value.unit != null" />
<span class="value" v-text="value.value" />
</div>
</div>
</div>

View file

@ -21,12 +21,10 @@
}
.pull-right {
display: inline-flex;
align-items: center;
direction: rtl;
padding-right: 0.5em;
:deep(.power-switch) {
@include pull-right;
margin-top: 0.25em;
}
}

View file

@ -150,21 +150,26 @@ $widths: (
}
.vertical-center {
display: flex;
align-items: center;
display: flex;
align-items: center;
}
.horizontal-center {
display: flex;
justify-content: center;
margin-left: auto;
margin-right: auto;
display: flex;
justify-content: center;
margin-left: auto;
margin-right: auto;
}
@mixin pull-right {
display: inline-flex;
text-align: right;
justify-content: right;
flex-grow: 1;
}
.pull-right {
text-align: right;
float: right;
justify-content: right;
@include pull-right;
}
.hidden {