11<template >
22 <MdButtonBase class =" md-outlined-button" :disabled =" disabled" >
33 <MdRipple />
4- <template v-if =" label " >
4+ <div class =" md-button__outline" ></div >
5+ <span v-if =" label" class =" md-button__label" >
56 {{ label }}
6- </template >
7- <slot v-else />
7+ </span >
8+ <span v-else class =" md-button__label" >
9+ <slot />
10+ </span >
811 </MdButtonBase >
912</template >
1013
@@ -30,27 +33,48 @@ defineProps({
3033$theme : tokens .md-comp-outlined-button-values ();
3134
3235.md-outlined-button {
33- background-color : map .get ($theme , container-color );
3436 height : map .get ($theme , container-height );
3537 border-radius : map .get ($theme , container-shape );
36- color : map .get ($theme , label-text-color );
37- font-family : map .get ($theme , label-text-font );
38- font-size : map .get ($theme , label-text-size );
39- font-weight : map .get ($theme , label-text-weight );
40- letter-spacing : map .get ($theme , label-text-tracking );
41- line-height : map .get ($theme , label-text-line-height );
4238 box-shadow : none ;
43- outline : map .get ($theme , outline-color ) solid map .get ($theme , outline-width );
4439 @include ripple .ripple ($theme , null, 100px );
4540
41+ .md-button__outline {
42+ position : absolute ;
43+ inset : 0 ;
44+ z-index : 0 ;
45+ border-radius : inherit ;
46+ outline : map .get ($theme , outline-color ) solid map .get ($theme , outline-width );
47+ }
48+ .md-button__label {
49+ color : map .get ($theme , label-text-color );
50+ font-family : map .get ($theme , label-text-font );
51+ font-size : map .get ($theme , label-text-size );
52+ font-weight : map .get ($theme , label-text-weight );
53+ letter-spacing : map .get ($theme , label-text-tracking );
54+ line-height : map .get ($theme , label-text-line-height );
55+ }
56+ .md-button__background {
57+ background-color : map .get ($theme , container-color );
58+ }
59+
4660 & :not (:disabled ):hover {
4761 box-shadow : none ;
4862 }
4963
5064 & :disabled {
51- outline-color : rgba (map .get ($theme , disabled-outline-color ), map .get ($theme , disabled-outline-opacity ));
52- color : rgba (map .get ($theme , disabled-label-text-color ), map .get ($theme , disabled-label-text-opacity ));
53- }
65+ box-shadow : none ;
5466
67+ .md-button__outline {
68+ outline-color : rgba (map .get ($theme , disabled-outline-color ), map .get ($theme , disabled-outline-opacity ));
69+ }
70+ .md-button__background {
71+ background-color : map .get ($theme , disabled-container-color );
72+ opacity : map .get ($theme , disabled-container-opacity );
73+ }
74+ .md-button__label {
75+ color : map .get ($theme , disabled-label-text-color );
76+ opacity : map .get ($theme , disabled-label-text-opacity );
77+ }
78+ }
5579}
5680 </style >
0 commit comments