Skip to content

Commit

Permalink
feat(experimental): Button add manual :checked appearance (#7034)
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea authored Mar 20, 2024
1 parent fd7464f commit 5a2f1c3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/core/styles/theme/appearance/outline.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
box-shadow: inset 0 0 0 1px var(--tui-base-06);
});

&:checked {
&:checked,
&._checked {
box-shadow: inset 0 0 0 2px var(--tui-primary);

.appearance-hover({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
Outline
</button>

<button
appearance="whiteblock"
tuiButton
>
Whiteblock
</button>

<button
appearance="opposite"
tuiButton
Expand All @@ -60,3 +67,27 @@
>
Floating
</button>

<p>
Use
<code>_checked</code>
class to emulate
<code>:checked</code>
CSS state for whiteblock/outline appearance:
</p>

<button
appearance="outline"
tuiButton
class="_checked"
>
Outline
</button>

<button
appearance="whiteblock"
tuiButton
class="_checked"
>
Whiteblock
</button>

0 comments on commit 5a2f1c3

Please sign in to comment.