This repository was archived by the owner on Feb 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272
7373: root .blue {
7474 --color : # 2a4365 ;
75- --background : # EBF8FF ;
75+ --background : # ebf8ff ;
7676}
7777
7878: root {
@@ -164,7 +164,8 @@ input {
164164 display : none;
165165}
166166
167- button , select {
167+ button ,
168+ select {
168169 text-transform : capitalize;
169170 min-width : 120px ;
170171 padding : 0.5rem 1rem ;
@@ -210,10 +211,23 @@ svg .text-shadow {
210211}
211212
212213.emoji {
213- display : inline;
214+ display : inline-block;
215+ background-size : contain;
214216 height : 1em ;
215217 width : 1em ;
216218 margin : 0 !important ;
217219 margin-top : -0.25em !important ;
218220 vertical-align : middle;
219221}
222+
223+ .emoji .light {
224+ background-image : url ('images/light.png' );
225+ }
226+
227+ .emoji .dark {
228+ background-image : url ('images/dark.png' );
229+ }
230+
231+ .emoji .blue {
232+ background-image : url ('images/blue.png' );
233+ }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const toggleElements = document.querySelectorAll('.pdm-toggle')
1717
1818const modeToLabel = ( m ) => {
1919 if ( m === 'dark' || m === 'light' || m === 'blue' ) {
20- return `<img class="emoji" src="images/ ${ m } .png" alt="" > ${ m } `
20+ return `<i class="emoji ${ m } "></i > ${ m } `
2121 }
2222 return m
2323}
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ html(data-pdm="light dark blue")
1919 - var outline = [' focus:outline-none focus:shadow-outline focus:border-yellow-300' ]
2020 div.container.px-3.mb-3
2121 div.header.flex.items-center.justify-between.flex-col.my-3 ( class ="md:flex-row md:my-6" )
22- h1.mb-3.title ( class ="md:mb-0" ) <img class =" emoji" src = " images/ dark.png " alt = " " >< img class =" emoji" src = " images/ light.png " alt = " " > Perfect Dark Mode
22+ h1.mb-3.title ( class ="md:mb-0" ) <i class =" emoji dark" ></ i >< i class =" emoji light" ></ i > Perfect Dark Mode
2323 button.rounded-sm.pdm-toggle.flex.flex-col.items-center ( style ="visibility: hidden;" class =outline)
24- span.label <img class =" emoji" src = " images/ light.png " alt = " " > color mode
24+ span.label <i class =" emoji light" ></ i > color mode
2525 span.text-xs (Click Me)
2626
2727 div.flex.space-x-2.justify-center ( class ="md:justify-start" )
@@ -53,7 +53,7 @@ html(data-pdm="light dark blue")
5353 // their system color mode.
5454 p You can set the color mode, this will be saved.
5555 button.rounded-sm.pdm-toggle ( style ="visibility: hidden;" class =outline)
56- span.label <img class =" emoji" src = " images/ light.png " alt = " " > color mode
56+ span.label <i class =" emoji light" ></ i > color mode
5757 p You can reset the color mode and fallback to system color mode.
5858 button.rounded-sm.pdm-reset ( class =outline) Reset
5959 p For debugging and understanding here is the saved color mode and the OS color mode.
You can’t perform that action at this time.
0 commit comments