semantic-forms 4.0.3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -167,8 +167,8 @@ form.semanticForms {
167
167
  }
168
168
  }
169
169
 
170
- menu:has(li > input),
171
- ul:has(li > input) {
170
+ menu:has(li > input, li > label, li > button, li > select, li > textarea),
171
+ ul:has(li > input, li > label, li > button, li > select, li > textarea) {
172
172
  display: flex;
173
173
  justify-content: space-between;
174
174
  flex-wrap: wrap;
@@ -201,6 +201,10 @@ form.semanticForms {
201
201
  padding: 6px 30px 6px 20px;
202
202
  }
203
203
 
204
+ &[type="password"], &[type="text"]:has(~ button.show) {
205
+ padding: 6px 55px 6px 20px;
206
+ }
207
+
204
208
  &[disabled] {
205
209
  cursor: not-allowed;
206
210
  opacity: 0.5;
@@ -243,7 +247,7 @@ form.semanticForms {
243
247
  // 30% larger based on parent font size
244
248
  width: 1.4em;
245
249
  height: 1.4em;
246
- margin: auto 0;
250
+ margin: 3px 0;
247
251
  cursor: pointer;
248
252
 
249
253
  & ~ label:first-of-type {
@@ -277,7 +281,7 @@ form.semanticForms {
277
281
  // #endregion
278
282
 
279
283
  // #region buttons
280
- button.clear {
284
+ button.clear, button.show {
281
285
  cursor: pointer;
282
286
  appearance: none;
283
287
  -webkit-appearance: none;
@@ -298,13 +302,18 @@ form.semanticForms {
298
302
  justify-content: center;
299
303
  }
300
304
 
305
+ button.show {
306
+ right: 25px;
307
+ }
308
+
301
309
  // custom styling of clear button on textarea
302
310
  textarea ~ .clear {
303
311
  bottom: auto;
304
312
  }
305
313
 
306
- // hide clear button while placeholder text is visible
314
+ // hide clear/show button while placeholder text is visible
307
315
  input:placeholder-shown ~ .clear,
316
+ input:placeholder-shown ~ .show,
308
317
  textarea:placeholder-shown ~ .clear,
309
318
  input[type=file] ~ .clear {
310
319
  display: none;
@@ -313,7 +322,7 @@ form.semanticForms {
313
322
  // button styling
314
323
  input[type='submit'],
315
324
  input[type='reset'],
316
- button:not(.clear) {
325
+ button:not(.clear):not(.show) {
317
326
  appearance: none;
318
327
  -moz-appearance: none;
319
328
  -webkit-appearance: none;
@@ -335,7 +344,7 @@ form.semanticForms {
335
344
  input[type='submit'],
336
345
  input[type='reset'],
337
346
  input[type='image'],
338
- button:not(.clear) {
347
+ button:not(.clear):not(.show) {
339
348
  transition: filter 0.1s;
340
349
 
341
350
  &:hover {