Skip to content

Commit bc62eaa

Browse files
d3xter666ilhan007
andauthored
fix(ui5-tokenizer): Fix invisble texts styling (#3394)
Resolves #2259 Tokenizer is a component which (for now) is not used standalone. Its main use case is to be used within MultiInput & MultiCombobox. The wrapping controls (MultiInput & MultiCombobox) style their layout using a flexbox, Tokenizer does the same in order to align the tokens. So, we end up with nested flexboxes. The Tokenizer however, has hidden texts within the flex elements and this leads to some strange behaviour where the whole wrapping control missalignes to its base line. The CSS Styles which are responsible for hidden texts (Acc), are defined globally and are reused within the Tokenizer. They rely on some absolute positioning with big dimesnisons, so the element won't fit in the visible area of the window. This solution breaks the nested flexboxes and for that case in the Tokenizer, we need to workaround it and implement an own, custom solution. This solution aligns the hidden texts along with the other flex elements without breaking the layout. Co-authored-by: ilhan <ilhan.myumyun@sap.com>
1 parent 90019b3 commit bc62eaa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/main/src/themes/Tokenizer.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
@import "./InvisibleTextStyles.css";
2-
31
:host {
42
display: inline-block;
53
box-sizing: border-box;
64
border: 1px solid black;
75
height: 2.25rem;
86
}
97

8+
.ui5-hidden-text {
9+
width: 1px;
10+
overflow: hidden;
11+
color: transparent;
12+
}
13+
1014
.ui5-tokenizer-root {
1115
height: 100%;
1216
display: flex;

0 commit comments

Comments
 (0)