Skip to content

Commit 645b692

Browse files
HTML switch control (#3342)
* HTML switch control * Update * Update features/switch-control.yml * Update features/switch-control.yml * Re-gen dist and add spec exception --------- Co-authored-by: Patrick Brosset <patrickbrosset@gmail.com>
1 parent 02591eb commit 645b692

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

features/switch-control.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: '<input type="checkbox" switch>'
2+
description: The `switch` attribute, when present on an `<input type="checkbox">` HTML element, renders a switch control with an on and off state instead of a checkbox control.
3+
spec: https://github.com/whatwg/html/pull/9546
4+
group:
5+
- forms
6+
- html-elements
7+
compat_features:
8+
- html.elements.input.switch

features/switch-control.yml.dist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Generated from: switch-control.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
safari: "17.4"
8+
safari_ios: "17.4"
9+
compat_features:
10+
- html.elements.input.switch

scripts/specs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ const defaultAllowlist: allowlistItem[] = [
239239
[
240240
"https://wicg.github.io/turtledove/",
241241
"Discontinued spec allowed for discouraged feature."
242+
],
243+
[
244+
"https://github.com/whatwg/html/pull/9546",
245+
"Allowed because the <input type=\"checkbox\" switch> feature is not yet in a formal spec. Remove this exception when a formal spec is available."
242246
]
243247
];
244248

0 commit comments

Comments
 (0)