wix-style-react
Version:
wix-style-react
106 lines (91 loc) • 2.06 kB
CSS
:import {
-st-from: '../Foundation/stylable/colors.st.css';
-st-named: B10, D10, D40, D55, THEME-TEXT-COLOR-PRIMARY;
}
:import {
-st-from: '../Foundation/stylable/typography.st.css';
-st-named: heading-h1, heading-xl;
}
.root {
-st-states: newColorsBranding;
position: relative;
display: flex;
flex-grow: 0;
box-sizing: border-box;
}
.root,
.root input {
-st-mixin: heading-h1;
color: value(THEME-TEXT-COLOR-PRIMARY);
}
.root:newColorsBranding,
.root:newColorsBranding input {
-st-mixin: heading-xl;
}
.root .headingWrapper,
.root .activationIndicator,
.root .renamingField {
box-sizing: border-box;
}
.root:hover .activationIndicator {
border-bottom: 1px solid value(B10);
}
.activationIndicator {
-st-states: focused, newColorsBranding;
bottom: 0;
margin-left: 6px;
margin-right: 4px;
padding-right: 4px;
max-width: 100%;
background: transparent;
border-bottom: 1px dashed value(D40);
color: transparent;
white-space: pre;
display: flex;
flex-grow: 0;
transition: all 0.3s ease;
overflow: hidden;
min-width: 1ch;
z-index: 1;
}
/* to keep the indicator below the input which is with the current static H1 and default input size either 36px or 42px */
.activationIndicator:newColorsBranding {
height: 37px;
}
.activationIndicator:not(newColorsBranding) {
height: 43px;
}
.activationIndicator:focused {
border-bottom: 1px solid value(B10);
flex-grow: 1;
}
.headingWrapper {
-st-states: focused, showPlaceholder;
max-width: 100%;
height: 100%;
position: absolute;
z-index: 3;
padding-right: 6px;
left: 6px;
overflow: hidden;
white-space: nowrap;
}
.headingWrapper:focused:not(:showPlaceholder) {
visibility: hidden;
}
.headingWrapper:showPlaceholder .heading {
color: value(D55);
}
.renamingField {
-st-states: focused;
visibility: hidden;
position: absolute;
z-index: 1;
width: 100%;
left: 6px;
padding-right: 10px;
}
.renamingField:focused {
visibility: inherit;
}
/* st-namespace-reference="../../../src/EditableTitle/EditableTitle.st.css" */