|
1 | 1 | <template> |
2 | 2 |
|
3 | 3 | <div> |
4 | | - <KButtonGroup style="margin-top: 8px;"> |
| 4 | + <KButtonGroup style="margin-top: 8px;" class="dots"> |
5 | 5 | <KIconButton |
6 | 6 | icon="language" |
7 | 7 | aria-hidden="true" |
|
10 | 10 | @click="showLanguageModal = true" |
11 | 11 | /> |
12 | 12 | <span |
13 | | - class="dotsSpan selected" |
| 13 | + class="selected" |
14 | 14 | :style="{ 'margin': '0' }" |
15 | 15 | :title="selectedLanguage.english_name" |
16 | 16 | > |
|
22 | 22 | :text="language.lang_name" |
23 | 23 | :title="language.english_name" |
24 | 24 | class="lang" |
25 | | - :class="determineLangDirection(language.lang_direction)" |
26 | 25 | appearance="basic-link" |
27 | 26 | :style="{ 'margin': '0 2px' }" |
28 | 27 | @click="switchLanguage(language.id)" |
|
101 | 100 | .slice(0, this.numVisibleLanguages); |
102 | 101 | }, |
103 | 102 | }, |
104 | | - methods: { |
105 | | - determineLangDirection(direction) { |
106 | | - return (!this.$isRTL && direction) || (this.$isRTL && !direction) ? 'dotsRtl' : 'dots'; |
107 | | - }, |
108 | | - }, |
109 | 103 | $trs: { |
110 | 104 | showMoreLanguagesSelector: 'More languages', |
111 | 105 | }, |
|
135 | 129 | text-align: left; |
136 | 130 | } |
137 | 131 |
|
138 | | - .dots:not(:last-child)::after { |
139 | | - // because it is a pseudo-element, text-decoration none only works with 'display: inline-block` |
140 | | - display: inline-block; |
141 | | - margin: 0 8px; |
142 | | - font-size: 14pt; |
143 | | - color: var(--v-grey-base); |
144 | | - text-decoration: none; |
145 | | - vertical-align: middle; |
146 | | - content: '•'; |
147 | | - } |
148 | | -
|
149 | | - .dotsSpan::after { |
| 132 | + // this selector applies to the elements defined in KButtonGroup |
| 133 | + .dots :not(:first-child, :last-child)::after { |
150 | 134 | display: inline-block; |
151 | 135 | margin: 0 6px; |
152 | 136 | font-size: 14pt; |
|
156 | 140 | content: '•'; |
157 | 141 | } |
158 | 142 |
|
159 | | - .dotsRtl:not(:last-child)::before { |
160 | | - display: inline-block; |
161 | | - margin: 0 8px; |
162 | | - font-size: 14pt; |
163 | | - color: var(--v-grey-base); |
164 | | - text-decoration: none; |
165 | | - vertical-align: middle; |
166 | | - content: '•'; |
167 | | - } |
168 | | -
|
169 | 143 | </style> |
0 commit comments