UNPKG

wix-style-react

Version:
96 lines (82 loc) 1.82 kB
/* st-namespace-reference="../../../src/EditableTitle/EditableTitle.st.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-h1-spacing; } .root { -st-states: reducedSpacingAndImprovedLayout; 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:reducedSpacingAndImprovedLayout, .root:reducedSpacingAndImprovedLayout input { -st-mixin: heading-h1-spacing; } .root .headingWrapper, .root .activationIndicator, .root .renamingField { box-sizing: border-box; } .root:hover .activationIndicator { border-bottom: 1px solid value(B10); } .activationIndicator { -st-states: focused; 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; } .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; }