summaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/themes/valo/components/_textfield.scss
diff options
context:
space:
mode:
Diffstat (limited to 'WebContent/VAADIN/themes/valo/components/_textfield.scss')
-rw-r--r--WebContent/VAADIN/themes/valo/components/_textfield.scss65
1 files changed, 45 insertions, 20 deletions
diff --git a/WebContent/VAADIN/themes/valo/components/_textfield.scss b/WebContent/VAADIN/themes/valo/components/_textfield.scss
index 39dfa3420e..75cfc5ef85 100644
--- a/WebContent/VAADIN/themes/valo/components/_textfield.scss
+++ b/WebContent/VAADIN/themes/valo/components/_textfield.scss
@@ -9,7 +9,51 @@ $v-textfield-disabled-opacity: $v-disabled-opacity !default;
+@mixin valo-textfield ($primary-stylename: v-textfield, $include-additional-styles: contains($v-included-additional-styles, textfield)) {
+ .#{$primary-stylename} {
+ @include valo-textfield-style;
+ width: $v-default-field-width;
+ }
+
+ .#{$primary-stylename}-readonly {
+ @include valo-textfield-readonly-style;
+ }
+
+ .#{$primary-stylename}-error {
+ @include valo-textfield-error-style;
+ }
+
+
+ @if $include-additional-styles {
+ .#{$primary-stylename}-borderless {
+ @include valo-textfield-borderless-style;
+ }
+
+ .#{$primary-stylename}-small {
+ @include valo-textfield-style($unit-size: $v-unit-size--small, $states: normal, $background-color: null, $border: null, $gradient: null, $bevel: null, $shadow: null);
+ font-size: $v-font-size--small;
+ }
+
+ .#{$primary-stylename}-large {
+ @include valo-textfield-style($unit-size: $v-unit-size--large, $states: normal, $background-color: null, $border: null, $gradient: null, $bevel: null, $shadow: null);
+ font-size: $v-font-size--large;
+ }
+
+ @include valo-textfield-inline-icon($stylenames: inline-icon);
+ @include valo-textfield-inline-icon($stylenames: inline-icon small, $unit-size: $v-unit-size--small, $font-size: $v-font-size--small);
+ @include valo-textfield-inline-icon($stylenames: inline-icon large, $unit-size: $v-unit-size--large, $font-size: $v-font-size--large);
+
+ .#{$primary-stylename}-align-right {
+ text-align: right;
+ }
+
+ .#{$primary-stylename}-align-center {
+ text-align: center;
+ }
+ }
+
+}
@@ -94,8 +138,7 @@ $v-textfield-disabled-opacity: $v-disabled-opacity !default;
}
// TODO allow parent selector to be used in interpolation
- &.v-textfield-prompt,
- &.v-textarea-prompt {
+ &[class*="prompt"] {
@include valo-textfield-prompt-style($background-color);
}
@@ -144,24 +187,6 @@ $v-textfield-disabled-opacity: $v-disabled-opacity !default;
}
-@mixin valo-textfield ($primary-stylename: v-textfield) {
-
- .#{$primary-stylename} {
- @include valo-textfield-style;
- width: $v-default-field-width;
- }
-
- .#{$primary-stylename}-readonly {
- @include valo-textfield-readonly-style;
- }
-
- .#{$primary-stylename}-error {
- @include valo-textfield-error-style;
- }
-
-}
-
-
@mixin valo-textfield-borderless-style ($background-color: transparent) {
border: none;