File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 167167 </p >
168168
169169 <% - example (` <button[[ class="focused"]]>I am focused</button>` ) %>
170+
171+ <p >
172+ Images and elements with <code >[role=img]</code > inside the button will get disabled state when the button is disabled.
173+ </p >
174+
175+ <% - example (`
176+ <button style="height: auto; padding: 16px;">
177+ <img style="width: 32px;height: 32px;" src="mail-icon.png" alt="icon"/>
178+ </button>
179+ <button style="height: auto; padding: 16px;" disabled>
180+ <img style="width: 32px;height: 32px;" src="mail-icon.png" alt="icon"/>
181+ </button>
182+ ` ) %>
170183 </div >
171184 </section >
172185
9871000 subscribing to more fun things on <a href =" https://twitter.com/jdan" >my twitter</a >. 👋
9881001 </p >
9891002 </main >
1003+
1004+ <svg id =" filters-98css" >
1005+ <defs >
1006+ <filter id =" disabled-filter-98css" >
1007+ <feColorMatrix
1008+ type =" matrix"
1009+ values =" 1 0 0 0 0
1010+ 0 1 0 0 0
1011+ 0 0 1 0 0
1012+ -21.25 -71.54 -7.21 40 0"
1013+ result =" color-matrix"
1014+ ></feColorMatrix >
1015+ <feFlood flood-color =" grey" result =" color" ></feFlood >
1016+ <feComposite in =" color" in2 =" color-matrix" operator =" in" ></feComposite >
1017+ <feDropShadow
1018+ dx =" 1"
1019+ dy =" 1"
1020+ stdDeviation =" 0"
1021+ flood-color =" white"
1022+ ></feDropShadow >
1023+ </filter >
1024+ </defs >
1025+ </svg >
9901026</body >
9911027</html >
Original file line number Diff line number Diff line change @@ -200,6 +200,11 @@ input[type="reset"]:disabled,
200200 text-shadow : 1px 1px 0 var (--button-highlight );
201201}
202202
203+ button : disabled img ,
204+ button : disabled [role = "img" ] {
205+ filter : url ("#disabled-filter-98css" );
206+ }
207+
203208.window {
204209 box-shadow : var (--border-window-outer ), var (--border-window-inner );
205210 background : var (--surface );
@@ -885,3 +890,10 @@ table > tbody > tr > * {
885890 padding : 0 var (--grouped-element-spacing );
886891 height : 14px ;
887892}
893+
894+ # filters-98css {
895+ position : absolute;
896+ pointer-events : none;
897+ top : 0 ;
898+ left : 0 ;
899+ }
You can’t perform that action at this time.
0 commit comments