Skip to content

Commit

Permalink
webapp: optimize spacing on bottom of cards
Browse files Browse the repository at this point in the history
if the last child in a card (div.card > div.card-body) adds bottom
marging, we don't want the card to add more space through its
padding-bottom. most cards have children that add sufficient space
at the bottom anyways.
  • Loading branch information
schlimmchen authored and tbnobody committed Nov 1, 2024
1 parent ba304b2 commit eecd7f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions webapp/src/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ div.accordion-item.accordion-table div.accordion-body {
div.card.card-table div.card-body {
padding: 0;
}

div.card div.card-body > :last-child {
margin-bottom: auto !important;
}
4 changes: 2 additions & 2 deletions webapp/src/views/DtuAdminView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<BIconInfoCircle v-tooltip :title="$t('dtuadmin.CmtPaLevelHint')" />
</label>
<div class="col-sm-10">
<div class="input-group mb-3">
<div class="input-group">
<input
type="range"
class="form-control form-range"
Expand Down Expand Up @@ -85,7 +85,7 @@
<BIconInfoCircle v-tooltip :title="$t('dtuadmin.CmtFrequencyHint')" />
</label>
<div class="col-sm-10">
<div class="input-group mb-3">
<div class="input-group">
<input
type="range"
class="form-control form-range"
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/views/InverterAdminView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
{{ $t('inverteradmin.Add') }}
</button>
</div>
<div class="alert alert-secondary" role="alert" v-html="$t('inverteradmin.AddHint')"></div>
</form>
<div class="alert alert-secondary" role="alert" v-html="$t('inverteradmin.AddHint')"></div>
</CardElement>

<CardElement :text="$t('inverteradmin.InverterList')" textVariant="text-bg-primary" add-space>
Expand Down

0 comments on commit eecd7f7

Please sign in to comment.