Skip to content

Commit

Permalink
Icons in the new login are not displayed correctly #22
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleb Gorelov committed Apr 20, 2020
1 parent 58c068b commit a647f6c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 8 deletions.
78 changes: 70 additions & 8 deletions modules/web/themes/helium/app/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,21 @@
@include he-select-size-style();
}

.v-caption {
@include he-caption-size-style();
}
@include he-caption-inline-icon-style();

&.small {
&.v-app,
&.v-app-loading {
font-size: $v-font-size--small;
}

@include he-caption-size-style($unit-size: $v-unit-size--small, $font-size: $v-caption-font-size--small);
.v-caption {
@include he-caption-size-style($unit-size: $v-unit-size--small, $font-size: $v-caption-font-size--small);
}
@include he-caption-inline-icon-style($unit-size: $v-unit-size--small, $font-size: $v-caption-font-size--small);

select {
@include he-select-size-style($unit-size: $v-unit-size--small, $font-size: $v-font-size--small);
Expand All @@ -53,31 +61,43 @@
font-size: $v-font-size--large;
}

@include he-caption-size-style($unit-size: $v-unit-size--large, $font-size: $v-caption-font-size--large);
.v-caption {
@include he-caption-size-style($unit-size: $v-unit-size--large, $font-size: $v-caption-font-size--large);
}
@include he-caption-inline-icon-style($unit-size: $v-unit-size--large, $font-size: $v-caption-font-size--large);

select {
@include he-select-size-style($unit-size: $v-unit-size--large, $font-size: $v-font-size--large);
}
}

.small {
@include he-caption-size-style($unit-size: $v-unit-size--small, $font-size: $v-caption-font-size--small);
.v-caption {
@include he-caption-size-style($unit-size: $v-unit-size--small, $font-size: $v-caption-font-size--small);
}
@include he-caption-inline-icon-style($unit-size: $v-unit-size--small, $font-size: $v-caption-font-size--small);

select {
@include he-select-size-style($unit-size: $v-unit-size--small, $font-size: $v-font-size--small);
}
}

.medium {
@include he-caption-size-style($unit-size: $v-unit-size, $font-size: $v-caption-font-size);
.v-caption {
@include he-caption-size-style($unit-size: $v-unit-size, $font-size: $v-caption-font-size);
}
@include he-caption-inline-icon-style($unit-size: $v-unit-size, $font-size: $v-caption-font-size);

select {
@include he-select-size-style($unit-size: $v-unit-size, $font-size: $v-font-size);
}
}

.large {
@include he-caption-size-style($unit-size: $v-unit-size--large, $font-size: $v-caption-font-size--large);
.v-caption {
@include he-caption-size-style($unit-size: $v-unit-size--large, $font-size: $v-caption-font-size--large);
}
@include he-caption-inline-icon-style($unit-size: $v-unit-size--large, $font-size: $v-caption-font-size--large);

select {
@include he-select-size-style($unit-size: $v-unit-size--large, $font-size: $v-font-size--large);
Expand All @@ -87,9 +107,8 @@

@mixin he-caption-size-style($unit-size : $v-unit-size,
$font-size : $v-caption-font-size) {
.v-caption {
font-size: $font-size;
}
font-size: $font-size;
padding-bottom: 0;

.v-icon + .v-captiontext,
.v-icon + span {
Expand All @@ -101,4 +120,47 @@
$font-size : null) {
font-size: $font-size;
padding: round($unit-size / 6);
}

@mixin he-caption-inline-icon-style($unit-size : $v-unit-size,
$font-size : $v-font-size) {
.v-slot-inline-icon {
.v-caption-inline-icon {
& > .v-icon {
// Move the icon if a field has a caption
&:not(:only-child) {
$caption-font-height: $font-size * $v-line-height;
margin-top: $caption-font-height;
}
}

& > span.v-icon {
padding-left: 0; // get rid of cuba padding
}
}
}

.v-caption-inline-icon {
@include he-caption-size-style($unit-size: $unit-size, $font-size: $font-size);

.v-icon + .v-captiontext,
.v-icon + span {
margin-left: 0;
}

.v-captiontext {
// override vaadin styles
font-size: $font-size;
padding: 0;
}

// Font icons
span.v-icon {
width: $unit-size;
line-height: $unit-size;
font-size: $font-size;

margin-left: first-number(he-border());
}
}
}
4 changes: 4 additions & 0 deletions modules/web/themes/helium/components/textfield/textfield.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
} @else {
padding: he-input-padding($unit-size);
}

&.inline-icon {
padding-left: $unit-size;
}
}

@function he-input-padding($unit-size: $v-unit-size) {
Expand Down

0 comments on commit a647f6c

Please sign in to comment.