File tree Expand file tree Collapse file tree 3 files changed +45
-10
lines changed
Expand file tree Collapse file tree 3 files changed +45
-10
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ button {
4141 color : inherit;
4242 cursor : inherit;
4343 outline : inherit;
44+ text-shadow : inherit;
4445
4546 display : inline-flex;
4647 justify-content : center;
Original file line number Diff line number Diff line change @@ -132,12 +132,23 @@ dom.register({ShinyDemo: view.component(use => {
132132 }
133133 ` ] ,
134134 ] ,
135- content : (
135+ content : [
136136 views . ShinyButton
137137 . props ( )
138138 . children ( "hello" )
139- . render ( )
140- ) ,
139+ . render ( ) ,
140+ views . ShinyButton
141+ . props ( )
142+ . attr ( "border-gradient" , true )
143+ . children ( "hello" )
144+ . render ( ) ,
145+ views . ShinyButton
146+ . props ( )
147+ . attr ( "angry" , true )
148+ . attr ( "border-gradient" , true )
149+ . children ( "hello" )
150+ . render ( ) ,
151+ ] ,
141152 style : css `
142153 .content sly-view {
143154 font-size: 2em;
Original file line number Diff line number Diff line change @@ -9,26 +9,49 @@ export const aura = css`@layer overlay {
99 } ) }
1010}
1111
12- xxx : host ([view = "shiny-button" ]) {
12+ : host ([view = "shiny-button" ]) {
1313 position : relative;
1414
15+ --b-bg : var (--calm );
1516 --padding : 0.3em 0.7em ;
17+
18+ color : white;
1619 border-radius : 2em ;
20+ background : var (--b-bg );
21+ border : none;
22+
23+ font-weight : medium;
24+ text-shadow : 0.1em 0.1em 0.1em # 0004 ;
25+ box-shadow : 0.1em 0.2em 0.3em # 0002 ;
26+ }
27+
28+ : host ([view = "shiny-button" ][angry ]) {
29+ --b-bg : var (--angry );
30+ }
31+
32+ : host ([view = "shiny-button" ][border-gradient ]) {
33+ border : none;
1734 background : linear-gradient (
1835 to bottom right,
19- cyan ,
20- blue
36+ color-mix (in oklab , var ( --b-bg ) , white 80 % ) ,
37+ color-mix (in oklab , var ( --b-bg ) , black 40 % )
2138 );
22- border : none;
23- box-shadow : 0.1em 0.2em 0.3em # 0004 ;
2439
2540 & ::before {
2641 content : "" ;
2742 display : block;
2843 position : absolute;
29- inset : 0 ;
30- background : red;
44+ z-index : 0 ;
45+ inset : 0.15em ;
46+ border-radius : inherit;
47+ background : color-mix (in oklab, var (--b-bg ), # 0004 50% );
3148 }
49+
50+ > * {
51+ position : relative;
52+ z-index : 1 ;
53+ }
54+
3255}
3356
3457: host ([view = "shiny-drawer" ]) {
You can’t perform that action at this time.
0 commit comments