ãšã©ãŒ
CSSæ©èœ
min()
ãè©Šããmax()
ããŸããŸãªæž¬å®åäœã䜿çšããŠããå Žåã次ã®ãããªãšã©ãŒã¡ãã»ãŒãžã衚瀺ãããå¯èœæ§ããããŸãIncompatible units: vh and em
ã
minïŒïŒé¢æ°ãšmaxïŒïŒé¢æ°ã§ç°ãªãåäœã䜿çšããå Žåã®ãšã©ãŒã¡ãã»ãŒãž
ãã®ã¡ãã»ãŒãžã¯ãSassã«ç¬èªã®é¢æ°ãããããã«è¡šç€ºãããŸã
min()
ããã®min()
çµæãCSSé¢æ°ã¯ç¡èŠãããŸããããã«ãSassã¯ããããã®éã«æ確ãªé¢ä¿ããªããŠãããã䜿çšããŠèšç®ãå®è¡ããããšã¯ã§ããŸããã
äŸãã°ãåäœã®é¢ä¿ããããŠ
cm
ãin
ãµã¹ã¯ãé¢æ°ã®çµæãèŠã€ããããšãã§ããããã«ãå®çŸ©ãããmin(20in, 50cm)
ãããªãã®ã³ãŒãå
ã§ãã®ãããªãã®ã䜿çšããå Žåããšã©ãŒãã¹ããŒããŸããã
åãããšãä»ã®æž¬å®åäœã§ãèµ·ãããŸããããšãã°ããã¹ãŠã®ã³ãŒããŒãŠãããã¯çžäºæ¥ç¶ãããŠããŸãïŒ
1turn
ã1rad
ãŸãã¯1grad
åžžã«åäœã§è¡šãããåãå€ã«å€æãããŸãdeg
ãããšãã°ã1s
åžžã«çããå Žåãåæ§1000ms
ã§ãã1kHz
åžžã«çãã1000Hz
ã1dppx
åžžã«çãã96dpi
ã1in
åžžã«çãã96px
ãããããSassããããã®åäœã§è¡šãããå€ãçžäºã«å€æããããèªäœã®é¢æ°ãªã©ã®ããŸããŸãªé¢æ°ã§äœ¿çšãããèšç®ã§ããããæ··åã§ããçç±min()
ã§ãã
ãããã枬å®åäœã®éã«æ確ãªé¢ä¿ããªãå ŽåïŒããšãã°ãäžèšã®y
em
ãšvh
ïŒããã¹ãŠãããŸããããŸããã
ãããŠãããã¯ãç°ãªã枬å®åäœã§è¡šãããå€ã䜿çšããå Žåã ãã§ã¯ãããŸããã
calc()
å
éšã§é¢æ°ã䜿çšããããšããŠããŸãmin()
ãŸãããšã©ãŒãçºçããŸããmin()
ãã®ããã«å
¥åããããšãããšãcalc(20em + 7px)
次ã®ãšã©ãŒã衚瀺ãããŸãcalc(20em + 7px) is not a number for min
ã
ããªããïŒèšç®å€ã䜿çšããããšãããšããšã©ãŒã¡ãã»ãŒãžïŒïŒååäœïŒãçºç
CSS-å€æ°ãŸãã¯ïŒã®ãããªCSS-æ°åŠé¢æ°ã®åºåã䜿çšããããšãããšå¥ã®åé¡ãç¶æ³ã§çºçãã
calc()
ãmin()
ãmax()
CSSã®ãããªãã£ã«ã¿ã§ã¯ïŒinvert()
ã
åæ§ã®ç¶æ³ã§è¡šç€ºãããå¯èœæ§ã®ãããšã©ãŒã¡ãã»ãŒãžã¯æ¬¡ã®ãšããã§ãã
$color: 'var(--p, 0.85) is not a color for invert
ãã£ã«ã¿ã§varïŒïŒã䜿çšãããšïŒinvertïŒïŒã¯ãšã©ãŒã«ãªããŸã
ïŒãšåãããšãèµ·ãããŸã
grayscale()
ïŒ$color: âcalc(.2 + var(--d, .3))â is not a color for grayscale
ã
ãã£ã«ã¿ã§calcïŒïŒã䜿çšãããšïŒgrayscaleïŒïŒã¯ãšã©ãŒ
èšèšã«
filter: opacity()
ãªããåæ§ã®åé¡ãçºçããå¯èœæ§ããããŸã$color: âvar(--p, 0.8)â is not a color for opacity
ã
ãã£ã«ã¿ãŒã«ïŒïŒVARã®äœ¿çšïŒäžéæ床ãïŒïŒãšã©ãŒãçºçã
ãŸãããä»ã®æ©èœã¯äœ¿çš
filter
ãå«ããsepia()
ãblur()
ãdrop-shadow()
ãbrightness()
ãcontrast()
ããã³hue-rotate()
ãCSS-å€æ°ã䜿çšããããšã¯å®å
šã«æ£åžžã§ãïŒ
ãã®åé¡ã®åå ã¯ãé¢æ°
min()
ãšã«åœ±é¿ãäžãããã®ãšåæ§ã§ããããšãå€æããŸããmax()
ããµã¹ã«ã¯çµã¿èŸŒã¿é¢æ°ã§ã¯ãããŸããsepia()
ãblur()
ãdrop-shadow()
ãbrightness()
ãcontrast()
ãhue-rotate()
ããã ããç¬èªã®é¢æ°ã§ããã°ã¬ãŒã¹ã±ãŒã«ïŒïŒãå転ïŒïŒãããã³äžéæ床ïŒïŒããããŸãããããã®é¢æ°ã®æåã®åŒæ°ã¯å€$color
ã§ããåé¡ã®ããæ§é ã䜿çšããå ŽåãSassã¯ãã®ãããªåŒæ°ãèŠã€ããããªãããããšã©ãŒã衚瀺ãããŸãã
åãçç±ã§ãå°ãªããšã2
hsl()
ã€ã®hsla()
å€ãŸãã¯-å€ãè¡šãCSSå€æ°ã䜿çšãããšåé¡ãçºçããŸãã
varïŒïŒãã«ã©ãŒã§äœ¿çšããå Žåã®ãšã©ãŒïŒhslïŒïŒ
äžæ¹ãSassã䜿çšããªãå Žåãæ§æ
color: hsl(9, var(--sl, 95%, 65%))
ã¯å®å
šã«æ£ãããå®å
šã«æ©èœããCSSæ§æã§ãããïŒ
ãªã©ã®é¢æ°ã«ã€ããŠãåãããšãèšããŸãã
rgb()
rgba()
varïŒïŒãè²ã§äœ¿çšãããšãšã©ãŒãçºçããŸãïŒrgbaïŒïŒ
ãŸããCompassãã€ã³ããŒãããŠ
linear-gradient()
orå
ã§CSSå€æ°ã䜿çšããããšãããšãradial-gradient()
å¥ã®ãšã©ãŒãçºçããå¯èœæ§ããããŸãããã ããåæã«ãconic-gradient()
å€æ°ã§å€æ°ãåé¡ãªã䜿çšã§ããŸãïŒãã¡ããããã©ãŠã¶ãŒããã®æ©èœããµããŒãããŠããå ŽåïŒã
ããã¯ã°ã©ãŠã³ãã§varïŒïŒã䜿çšãããšãšã©ãŒãçºçããŸãïŒlinear-gradientïŒïŒ
ãã®åé¡ã®çç±ã¯ãCompassã«ç¬èªã®linear-gradientïŒïŒãš
radial-gradient()
é¢æ°ããããŸãããé¢æ°conic-gradient()
ãååšããªãã£ãããã§ãã
äžè¬ã«ããããã®åé¡ã¯ãã¹ãŠãSassãŸãã¯Compassãç¬èªã®æ©èœãæã£ãŠããããã®ååãCSSã®ãã®ãšåãã§ãããšããäºå®ã«èµ·å ããŠããŸããSassãšCompassã¯ã©ã¡ããããããã®æ©èœãæºããå Žåãæšæºã®å®è£ ã§ã¯ãªãããããã®æ©èœã®ç¬èªã®å®è£ ã䜿çšãããšèããŠããŸãã
ãããåŸ ã¡äŒãã§ãïŒ
解決
ãã®åé¡ã¯ãSassã¯å€§æåãšå°æåãåºå¥ããŸãããCSSã¯ããã§ã¯ãªãããšãèŠããŠããããšã§è§£æ±ºã§ããŸãã
ããã¯ããã®ãããªãã®ãæžãããšãã§ã
Min(20em, 50vh)
ãSassããã®æ§é å
ã®ç¬èªã®é¢æ°ãèªèããªãããšãæå³ããŸãmin()
ããšã©ãŒã¯çæãããŸããããã®æ§æã¯ãæåŸ
ã©ããã«æ©èœããæŽåœ¢åŒã®CSSã«ãªããŸããåæ§ã«ãä»ã®æ©èœãšã®åé¡ãåãé€ãããã«èªåã®ååãæžã蟌ãããšã«ãã£ãŠãéæšæºçãªæ¹æ³ããããšãã§ããŸãïŒHSL()
ãHSLA()
ãRGB()
ãRGBA()
ãInvert()
ã
ã°ã©ããŒã·ã§ã³ã«é¢ããŠã¯ãç§ã¯é垞次ã®åœ¢ç¶ã䜿çšããŸãïŒ
linear-Gradient()
ãšradial-Gradient()
ããã®è¡šèšã¯SVGã§äœ¿çšãããŠããååã«è¿ãããããããè¡ããŸãããã ããå°ãªããšã1ã€ã®å€§æåãå«ãä»ã®åæ§ã®ååã¯ãã®ç¶æ³ã§æ©èœããŸãã
ãªãããããã¹ãŠã®å䜵çïŒ
Sassã«ã€ããŠãã€ãŒããããã³ã«ãCSSå€æ°ãã§ããã®ã§ãSassã䜿çšããå¿ èŠããªããªã£ãããšã«ã€ããŠè¬çŸ©ãåããŸããç§ã¯ããã«çããŠããã®èãã«å察ããçç±ã説æããããšã«ããŸããã
ãŸããCSSå€æ°ã¯éåžžã«äŸ¿å©ã§ãããéå»3幎éã«ããŸããŸãªã¿ã¹ã¯ã«äœ¿çšããŠããããšã«æ³šæããŠãã ããããã ãããããã䜿çšãããšããã©ãŒãã³ã¹ã«åœ±é¿ããããšãèŠããŠããå¿ èŠããããšæããŸãããããŠãåŒã³åºãã®è¿·è·¯ã®åé¡ã®æ€çŽ¢
calc()
æãäžå¿«ãªçµéšã«ãªãå¯èœæ§ããããŸããæšæºã®ãã©ãŠã¶éçºè
ããŒã«ã¯ããŸã ãããåŸæã§ã¯ãããŸãããç§ã¯CSSå€æ°ã®äœ¿çšã«å€¢äžã«ãªããªãããã«ããŠããŸããããããããšã§ãCSSå€æ°ã®æ¬ ç¹ãå©ç¹ãããå€ãçŸããç¶æ³ã«é¥ããªãããã«ããŠããŸãã
ãããã®calcïŒïŒåŒã®è©äŸ¡çµæãã©ããªãããç解ããã®ã¯ç°¡åã§ã¯ãããŸããã
äžè¬ã«ãå€æ°ãå®æ°ãšããŠäœ¿çšãããšãèŠçŽ ããšããŸãã¯ç¶æ ããšã«å€åããŸããïŒãã®ãããªå ŽåãCSSå€æ°ã¯å¿ ã䜿çšããå¿ èŠããããŸãïŒãå¿ èŠïŒããŸãã¯å€æ°ãã³ã³ãã€ã«ãããCSSã®éãåæžããªãå ŽåïŒãã¬ãã£ãã¯ã¹ã«ãã£ãŠäœæãããç¹°ãè¿ãã®åé¡ã解決ããïŒãSasså€æ°ã䜿çšããŸãã
第äºã«ãç§ãSassã䜿çšããçç±ã®äžã§ãå¯å€ãµããŒãã¯åžžã«ããªããã€ããŒãªçç±ã§ããã 2012幎åŸåã«Sassã䜿ãå§ãããšãã¯ãäž»ã«ã«ãŒãçšã«äœ¿ããŸããã CSSã«ãŸã æ¬ ããŠããæ©èœã®å Žåãã«ãŒãããžãã¯ã®äžéšãHTMLããªããã»ããµã«ç§»åããŸãããïŒããã«ãããçæãããã³ãŒãã®éãæžããHTMLãšCSSã®äž¡æ¹ãå€æŽããå¿ èŠããªããªãããïŒãå€ãã®å ŽåãSassã«ãŒãã䜿çšããŸãããããã«ã¯ãå€ã®ãªã¹ãã®çæãåŸé ã調æŽããããã®å€ã®äœæãé¢æ°ãæäœãããšãã®ãã€ã³ãã®
polygon()
ãªã¹ãã®äœæãå€æã®ãªã¹ãã®äœæãªã©ãå«ãŸããŸãã
以äžã¯ãããªããã»ããµã䜿çšããŠããã€ãã®HTMLèŠçŽ ãäœæãããšãã«ä»¥åã«è¡ã£ãã§ãããããšã®äŸã§ããã©ã®ããªããã»ããµã§ãããŸããŸããããPugãéžæããŸããã
- let n = 12;
while n--
.item
次ã«
$n
ãSassã§å€æ°ãäœæãïŒãã®å€æ°ã¯HTMLãšåãå€ã§ããå¿
èŠããããŸãïŒãããã䜿çšããŠã«ãŒããéå§ããŸããããã§ãåèŠçŽ ã®é
眮ã«äœ¿çšãããå€æãçæããŸãã
$n: 12;
$ba: 360deg/$n;
$d: 2em;
.item {
position: absolute;
top: 50%; left: 50%;
margin: -.5*$d;
width: $d; height: $d;
/* */
@for $i from 0 to $n {
&:nth-child(#{$i + 1}) {
transform: rotate($i*$ba) translate(2*$d) rotate(-$i*$ba);
&::before { content: '#{$i}' }
}
}
}
ããã®æ¬ ç¹ã¯ãèŠçŽ ã®æ°ãå€æŽãããå ŽåãPugã³ãŒããšSassã³ãŒãã®äž¡æ¹ã®å€ãå€æŽããå¿ èŠãããããšã§ããããã«ãã³ãŒãã«ã¯å€ãã®ç¹°ãè¿ãããããŸãã
äžèšã®ã³ãŒãããçæãããCSSã³ãŒã
ä»ãç§ã¯å¥ã®ã¢ãããŒããåããŸãããã€ãŸããPugã䜿çšããŠãã«ã¹ã¿ã ããããã£ãšããŠã€ã³ããã¯ã¹ãçæãã宣èšã§äœ¿çšããŸã
transform
ã
PugãåŠçããäºå®ã®ã³ãŒãã¯æ¬¡ã®ãšããã§ãã
- let n = 12;
body(style=`--n: ${n}`)
- for(let i = 0; i < n; i++)
.item(style=`--i: ${i}`)
Sassã³ãŒãã¯æ¬¡ã®ãšããã§ãã
$d: 2em;
.item {
position: absolute;
top: 50%;
left: 50%;
margin: -.5*$d;
width: $d;
height: $d;
/* */
--az: calc(var(--i)*1turn/var(--n));
transform: rotate(var(--az)) translate(2*$d) rotate(calc(-1*var(--az)));
counter-reset: i var(--i);
&::before { content: counter(i) }
}
ããã§ãã®ã³ãŒããè©Šãããšãã§ããŸãã
ã«ãŒã
ã䜿çšããŠçæããã³ã¹ã¿ã€ã«èšå®ãããèŠçŽ ãã®ã¢ãããŒããæ¡çšãããšãèªåçæãããCSSã®éãå€§å¹ ã«åæžãããŸããã
äžèšã®ã³ãŒãããçæãããCSS
ããããè¹ã®ãããªãã®ãäœæãããå Žåã¯ãSassã«ãŒããªãã§ã¯å®è¡ã§ããŸããã
@function get-rainbow($n: 12, $sat: 90%, $lum: 65%) {
$unit: 360/$n;
$s-list: ();
@for $i from 0 through $n {
$s-list: $s-list, hsl($i*$unit, $sat, $lum)
}
@return $s-list
}
html { background: linear-gradient(90deg, get-rainbow()) }
ããã«ãããŸãããã®äŸã®äœæ¥ããŒãžã§ã³ã¯ã
ãã«ãã«ã©ãŒã®èæ¯
ãã¡ãããããã¯Pugå€æ°ã䜿çšããŠçæã§ããŸããããã®ã¢ãããŒãã¯CSSå€æ°ã®åçãªæ§è³ªã«åãå©ç¹ã¯ãªãããã©ãŠã¶ãŒã«éä¿¡ãããã³ãŒãã®éãæžããããšã¯ãããŸãããçµæãšããŠãç§ãæ £ããŠãããã®ããããããããšã¯ç§ã«ã¯æå³ããããŸããã
ç§ã¯ãäžè§é¢æ°ãªã©ãSassïŒããã³CompassïŒã®çµã¿èŸŒã¿ã®æ°åŠé¢æ°ããã䜿çšããŸããæè¿ããããã®æ©èœã¯CSSä»æ§ã®äžéšã§ããããã¹ãŠã®ãã©ãŠã¶ãŒããŸã ãããããµããŒãããŠããããã§ã¯ãããŸããã Sassã«ã¯ãããã®æ©èœã¯ãããŸããããCompassã«ã¯ãããŸãããã®ãããç§ã¯Compassããã䜿çšããŸãã
ãããŠãã¡ãããç§ã¯ãã®çš®ã®ç¬èªã®é¢æ°ãSassã§äœæã§ããŸãã Compassãéäžè§é¢æ°ããµããŒãããåã«ãç§ã¯ãããæåã«è¡ããŸãããç§ã¯æ¬åœã«ãããã®é¢æ°ãå¿ èŠãªã®ã§ããã€ã©ãŒã·ãªãŒãºã䜿çšããŠèªåã§äœæããŸãããããããæè¿ã®ã³ã³ãã¹ã«ã¯ãããã®æ©èœããããŸãããããã¯ç§ãèªåã§æžãããã®ãããåªããŠããŠçç£çã§ãã
ç§ã¯ã¢ãŒãã£ã¹ãã§ã¯ãªãããã°ã©ããŒã§ãããããæ°åŠé¢æ°ã¯ç§ã«ãšã£ãŠéåžžã«éèŠã§ããç§ã®CSSã®å€ã¯éåžžãæ°åŠçãªèšç®ããçæãããŸãããããã¯ããã€ãã®ãéæ³ã®æ°åãããŸãã¯çŽç²ã«å¯©çŸçãªåœ¹å²ãæãããã®ã§ã¯ãããŸããããããã®äœ¿çšäŸã¯ã次ã®æ£èŠãŸãã¯æºæ£èŠããªãŽã³ã®ãªã¹ããçæããããšã§ãã
clip-path
..ãããã¯ãããšãã°ãã¢ãã¿ãŒãã¹ããã«ãŒãªã©ã圢ç¶ãé·æ¹åœ¢ãšã¯ç°ãªããã®ãäœæãããšãã«äœ¿çšãããŸãã
é ç¹ãåäžã«ããéåžžã®ããªãŽã³ã«ã€ããŠèããŠã¿ãŸãã次ã®äŸã®ã¹ã©ã€ããŒããã©ãã°ãããšãããã§å®éšã§ããŸããããã«ãããé ç¹ã®æ°ãç°ãªã圢ç¶ã®ãã€ã³ããã©ãã«é 眮ãããŠãããã確èªã§ããŸãã
3ã€ã®é ç¹ãæã€åœ¢ç¶
ããã¯ã察å¿ããSassã³ãŒããã©ã®ããã«èŠãããã§ãã
@mixin reg-poly($n: 3) {
$ba: 360deg/$n; //
$p: (); // ,
@for $i from 0 to $n {
$ca: $i*$ba; //
$x: 50%*(1 + cos($ca)); // x
$y: 50%*(1 + sin($ca)); // y
$p: $p, $x $y //
}
clip-path: polygon($p) // clip-path
}
ããã§ã¯ã«ãŒãããã®ä»ã®æ§é ã䜿çšããŠããããšã«æ³šæããŠãã ããããããã¯çŽç²ãªCSSã§äœ¿çšããã«ã¯éåžžã«äžäŸ¿ã§ãã
ãã®äŸã®ããå°ãé«åºŠãªããŒãžã§ã³ã§
$oa
ã¯ãåé ç¹ã«å¯Ÿå¿ããã³ãŒããŒã«åããªãã»ããïŒïŒãè¿œå ããŠããªãŽã³ãå転ãããå¿
èŠããããŸããããã¯ã次ã®äŸã§ç¢ºèªã§ããŸããæã¯ããã§çæãããåæ§ã®æ¹æ³ã§é
眮ãããŸãããåžžã«å¶æ°ã®é ç¹ããããŸãããã®å Žåãå¥æ°ã®ã€ã³ããã¯ã¹ãæã€åé ç¹ã¯ãååŸãã¡ã€ã³ã®åïŒ$f*50%
ïŒãããå°ããåäžã«é
眮ãããŸãã
æ
ããªãã¯ãã®ãããªé¢çœãæãäœãããšãã§ããŸãã
æçãããã³ãã¬ãŒãã䜿çšããŠäœæããã
å¢çç·ïŒ
border
ïŒä»ãã®ã¹ããã«ãŒãäœæã§ããŸããã§ã¯ãã®äŸãã¹ããã«ãŒã¯ãåäžã®HTMLèŠçŽ ããäœæãããã«ã¹ã¿ãã€ãºã®ããã«äœ¿çšããããã³ãã¬ãŒããborder
䜿çšããŠäœæãããclip-path
ãµã¹ã«ãŒããšæ°åŠããå®éãããã«ã¯ããããã®èšç®ããããŸãã
è€éãªå¢çç·ã®ããã¹ããã«ãŒ
ãã1ã€ã®äŸã¯ãã«ãŒãã®èæ¯ãäœæããæ¹æ³ã§ããããã§ã¯ãã«ãŒãå ã§ãã¢ãžã¥ã©ã¹æŒç®åãšææ°é¢æ°ã䜿çšããŠããã£ã¶ãªã³ã°å¹æãæš¡å£ããŠèæ¯ãäœæããŸãã
ãã£ã¶ãªã³ã°ã®å¹æ
ããã¯ãCSSå€æ°ãé »ç¹ã«äœ¿çšãããå Žæã§ããããŸãã
次ã«ãã¹ã©ã€ããŒã®ãããªãã®ãã¹ã¿ã€ãªã³ã°ãããšãã«åã宣èšãäœåºŠãæžãå¿ èŠããªãããã«ãããã¯ã¹ã€ã³ã䜿çšããããšãæ€èšã§ããŸãããã©ãŠã¶ãŒãç°ãªãã°ããã®ãããªã³ã³ãããŒã«ã®å éšã³ã³ããŒãã³ãã®ã¹ã¿ã€ã«ãèšå®ããããã«ç°ãªãç䌌èŠçŽ ã䜿çšãããããããŸããŸãªç䌌èŠçŽ ã䜿çšããŠå€èŠ³ãå¶åŸ¡ããã³ã³ããŒãã³ãããšã«ã¹ã¿ã€ã«ãå®çŸ©ããå¿ èŠããããŸãã
æ®å¿µãªãããCSSã§ã¯ãé åçã«èãããŸããã次ã®ã³ãŒãã®ãããªãã®ãé 眮ããããšã¯ã§ããŸããã
input::-webkit-slider-runnable-track,
input::-moz-range-track,
input::-ms-track { /* */ }
ããã¯åäœããŸãããå°ãªããšã1ã€ã®ã»ã¬ã¯ã¿ãŒãèªèãããªãå Žåããã®ã«ãŒã«ã»ããå šäœã¯ç¡èŠãããŸãããŸãããã®äŸã§ã¯3ã€ã®ã»ã¬ã¯ã¿ãŒãã¹ãŠã®ååšããã©ãŠã¶ãŒãèªèããŠããªãããããããã®ã¹ã¿ã€ã«ã¯ã©ã®ãã©ãŠã¶ãŒã«ãé©çšãããŸããã
ã¹ã¿ã€ãªã³ã°ãæ©èœããããå Žåã¯ã次ã®ãããªããšãè¡ãå¿ èŠããããŸãã
input::-webkit-slider-runnable-track { /* */ }
input::-moz-range-track { /* */ }
input::-ms-track { /* */ }
ããããããã¯åãã¹ã¿ã€ã«ãã³ãŒãã«3åçŸãããšããäºå®ã«ã€ãªããå¯èœæ§ããããŸãããŸããããšãã°
track
ããããã£ãå€æŽããå¿
èŠãããå Žåbackground
ãããã¯ãã in ::-webkit-slider-runnable-track
ã::-moz-range-track
ããã³inã®ã¹ã¿ã€ã«ãç·šéããå¿
èŠãããããšãæå³ããŸã::-ms-track
ã
ãã®åé¡ã«å¯Ÿããå¯äžã®æ£ãã解決çã¯ãããã¯ã¹ã€ã³ã䜿çšããããšã§ããã¹ã¿ã€ã«ã¯ã³ã³ãã€ã«ãããã³ãŒãã§ç¹°ãè¿ãããŸããã¹ã¿ã€ã«ããªããšã§ããªãããã§ãããå°ãªããšãããšãã£ã¿ãŒã§åãã³ãŒãã3åå ¥åããå¿ èŠã¯ãããŸããã
@mixin track() { /* */ }
input {
&::-webkit-slider-runnable-track { @include track }
&::-moz-range-track { @include track }
&::-ms-track { @include track }
}
çµæ
ç§ãåŒãåºãããšãã§ããäž»ãªçµè«ã¯ããã§ãïŒãµã¹ã€ã³ã¯ç§ãã¡ããŸã ãªãã§ã¯ã§ããªãããšã§ãã
Sassã䜿çšããŠããŸããïŒ