Change inputs style base on new mocks
This commit is contained in:
parent
5feca2d845
commit
3a4aa92c44
|
@ -4,13 +4,14 @@
|
||||||
/* Basic Information */
|
/* Basic Information */
|
||||||
--input-placeholder-color: @global-meta-color;
|
--input-placeholder-color: @global-meta-color;
|
||||||
--input-placeholder-weight: 400;
|
--input-placeholder-weight: 400;
|
||||||
|
--input-placeholder-padding-horizontal: 5px;
|
||||||
--input-hint-color: @global-meta-color;
|
--input-hint-color: @global-meta-color;
|
||||||
--input-color: @global-emphasis-color;
|
--input-color: @global-emphasis-color;
|
||||||
--input-border-radius: @global-border-radius;
|
--input-border-radius: @global-border-radius;
|
||||||
/* Size modifiers */
|
/* Size modifiers */
|
||||||
--input-padding-vertical: 12px;
|
--input-padding-vertical: 12px;
|
||||||
--input-padding-horizontal: 25px;
|
--input-padding-horizontal: 25px;
|
||||||
--input-font-size: @global-font-size;
|
--input-font-size: @global-small-font-size;
|
||||||
/* Styling */
|
/* Styling */
|
||||||
--input-background: transparent;
|
--input-background: transparent;
|
||||||
--input-shadow: none;
|
--input-shadow: none;
|
||||||
|
@ -26,7 +27,7 @@
|
||||||
--input-background-focus: var(--input-background);
|
--input-background-focus: var(--input-background);
|
||||||
--input-shadow-focus: var(--input-shadow);
|
--input-shadow-focus: var(--input-shadow);
|
||||||
--input-border-focus: var(--input-border);
|
--input-border-focus: var(--input-border);
|
||||||
--input-color-focus: @global-link-hover-color;
|
--input-placeholder-color-focus: @global-emphasis-color;
|
||||||
--input-border-style-focus: var(--input-border-style);
|
--input-border-style-focus: var(--input-border-style);
|
||||||
/* Disabled */
|
/* Disabled */
|
||||||
--input-color-disabled: @global-muted-color;
|
--input-color-disabled: @global-muted-color;
|
||||||
|
@ -60,37 +61,39 @@
|
||||||
background: var(--input-background);
|
background: var(--input-background);
|
||||||
border-radius: var(--input-border-radius);
|
border-radius: var(--input-border-radius);
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: calc(var(--input-padding-vertical) + 23px) 0 var(--input-padding-vertical) var(--input-padding-horizontal);
|
padding: var(--input-padding-vertical) 0 var(--input-padding-vertical) var(--input-padding-horizontal);
|
||||||
cursor: text;
|
cursor: pointer;
|
||||||
color: var(--input-color);
|
color: var(--input-color);
|
||||||
|
|
||||||
&.static {
|
&.static {
|
||||||
padding-top: var(--input-padding-vertical);
|
padding-top: var(--input-padding-vertical);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.select {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
& > .placeholder {
|
& > .placeholder {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
overflow: hidden;
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
color: var(--input-placeholder-color);
|
color: var(--input-placeholder-color);
|
||||||
font-weight: var(--input-placeholder-weight);
|
font-weight: var(--input-placeholder-weight);
|
||||||
|
|
||||||
& > label {
|
& > label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
background: linear-gradient(
|
||||||
|
to top,
|
||||||
|
var(--input-background) 0%,
|
||||||
|
var(--input-background) 50%,
|
||||||
|
transparent 50%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
|
padding: 0 var(--input-placeholder-padding-horizontal);
|
||||||
font-size: var(--input-font-size);
|
font-size: var(--input-font-size);
|
||||||
line-height: @global-line-height;
|
line-height: @global-line-height;
|
||||||
top: calc(var(--input-padding-vertical) + @global-line-height);
|
top: var(--input-padding-vertical);
|
||||||
left: var(--input-padding-horizontal);
|
left: calc(var(--input-padding-horizontal) - var(--input-placeholder-padding-horizontal));
|
||||||
transform: translateY(-50%);
|
transition: all 0.3s ease 0s;
|
||||||
transition: all 0.5s ease 0s;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,13 +213,17 @@
|
||||||
border-color: var(--input-border-focus);
|
border-color: var(--input-border-focus);
|
||||||
border-style: var(--input-border-style-focus);
|
border-style: var(--input-border-style-focus);
|
||||||
|
|
||||||
|
& > .input-box:not(.select) {
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
|
||||||
& > .input-box {
|
& > .input-box {
|
||||||
box-shadow: var(--input-shadow-focus);
|
box-shadow: var(--input-shadow-focus);
|
||||||
background: var(--input-background-focus);
|
background: var(--input-background-focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.hint):not(.disabled) > .input-box > .placeholder > label {
|
&:not(.hint):not(.disabled):not(.danger) > .input-box > .placeholder > label {
|
||||||
color: var(--input-color-focus);
|
color: var(--input-placeholder-color-focus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +264,8 @@
|
||||||
&.active > .input-box > .placeholder > label,
|
&.active > .input-box > .placeholder > label,
|
||||||
&.focused > .input-box > .placeholder > label,
|
&.focused > .input-box > .placeholder > label,
|
||||||
&.hint > .input-box > .placeholder > label {
|
&.hint > .input-box > .placeholder > label {
|
||||||
top: calc(var(--input-padding-vertical) + 13px);
|
transform: translateY(-50%);
|
||||||
|
top: calc(var(--input-border-width) * -1);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
}
|
}
|
||||||
|
@ -275,6 +283,7 @@
|
||||||
&.flat {
|
&.flat {
|
||||||
--input-background: @global-inverse-color;
|
--input-background: @global-inverse-color;
|
||||||
--input-border: @gray-300;
|
--input-border: @gray-300;
|
||||||
|
--input-border-focus: @global-emphasis-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.border-bottom {
|
&.border-bottom {
|
||||||
|
@ -283,12 +292,11 @@
|
||||||
--input-border-style: hidden hidden solid hidden;
|
--input-border-style: hidden hidden solid hidden;
|
||||||
--input-padding-horizontal: 0;
|
--input-padding-horizontal: 0;
|
||||||
--input-padding-vertical: 5px;
|
--input-padding-vertical: 5px;
|
||||||
|
--input-placeholder-padding-horizontal: 0;
|
||||||
--input-border-focus: @global-color;
|
--input-border-focus: @global-color;
|
||||||
--input-font-size: 14px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.search {
|
&.search {
|
||||||
--input-font-size: 14px;
|
|
||||||
--input-padding-horizontal: 30px;
|
--input-padding-horizontal: 30px;
|
||||||
--input-padding-vertical: 15px;
|
--input-padding-vertical: 15px;
|
||||||
}
|
}
|
||||||
|
@ -299,7 +307,6 @@
|
||||||
--input-border-radius: 54px;
|
--input-border-radius: 54px;
|
||||||
--input-padding-horizontal: 30px;
|
--input-padding-horizontal: 30px;
|
||||||
--input-padding-vertical: 10px;
|
--input-padding-vertical: 10px;
|
||||||
--input-font-size: 14px;
|
|
||||||
--input-background-hover: @global-muted-background;
|
--input-background-hover: @global-muted-background;
|
||||||
--input-shadow-hover: if(@input-mode = dark, @global-medium-box-shadow, @inverse-global-medium-box-shadow);
|
--input-shadow-hover: if(@input-mode = dark, @global-medium-box-shadow, @inverse-global-medium-box-shadow);
|
||||||
--input-background-focus: @global-background;
|
--input-background-focus: @global-background;
|
||||||
|
@ -308,18 +315,17 @@
|
||||||
|
|
||||||
&.icon-left {
|
&.icon-left {
|
||||||
--input-padding-horizontal: 0;
|
--input-padding-horizontal: 0;
|
||||||
|
--input-placeholder-padding-horizontal: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.x-small {
|
&.x-small {
|
||||||
--input-padding-horizontal: 15px;
|
--input-padding-horizontal: 15px;
|
||||||
--input-padding-vertical: 5px;
|
--input-padding-vertical: 10px;
|
||||||
--input-font-size: 14px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.small {
|
&.small {
|
||||||
--input-padding-horizontal: 20px;
|
--input-padding-horizontal: 20px;
|
||||||
--input-padding-vertical: 10px;
|
--input-padding-vertical: 10px;
|
||||||
--input-font-size: 14px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.small-vertical {
|
&.small-vertical {
|
||||||
|
|
Loading…
Reference in New Issue