ã«ã¹ã±ã¼ãå¦çã«ã¤ãã¦
ã£ã¦ãããCSSãªäººã«ã¯å¸¸èãªã®ãï¼
- Assigning property values, Cascading, and Inheritance
- 値の割り当て、カスケード処理、継承
- http://www6.plala.or.jp/go_west/nextcss/ref/basic/cascade.htm
- http://anslasax.net/css-make/cascade.html
ããã辺ãã½ã¼ã¹ã
追è¨
ä»æ¥ãä¼ç¤¾ã®CSSåå¼·ä¼ããã£ã¦ããã®è³æä½ã£ãã®ã§å¾ã»ã©å
¬éãã¾ã£ããã
ãã§ãã£ã¦ã«ã¹ã±ã¼ãå¦çã«ã¤ãã¦ãè¨åããã®ã§ãèå³ã®ãã人ã¯è¦ã¦ä¸ããã
ã«ã¹ã±ã¼ãé ä½ã®å®ç¾©
大ã¾ãã«åããã¨æ¬¡ã®4ã¤ã®è¦ç´ ãåé¡ã¨ãªãã
- åªä½å(media type)
- åºæ(誰ãä½ã£ãã¹ã¿ã¤ã«ã)
- 詳細度
- åºç¾é
ã§ãé©ç¨ãããéã¿ããã®é çªã
åºæã«ã¤ãã¦
ã¤ã¾ãã¯ããããäºã§ãã
ææ¸ä½æè ã®ã¹ã¿ã¤ã« > ã¦ã¼ã¶ã¼ã¹ã¿ã¤ã« > ããã©ã«ã
æéè¦å®£è¨ãããå ´åã¯ã¦ã¼ã¶ã¼ã¹ã¿ã¤ã«ã®æ¹ãåªå ã«ãªãã¾ãã
詳細度
- ã»ã¬ã¯ã¿å ã®ä¸æå±æ§ãæ°ãä¸ãããã®æ°ããaãã¨ããã
- ä»ã®å±æ§åã³æ¬ä¼¼ã¯ã©ã¹ãæ°ãä¸ãããã®æ°ããbãã¨ããã
- è¦ç´ åãæ°ãä¸ãããã®æ°ããcãã¨ããã
- æ¬ä¼¼è¦ç´ ã¯ç¡è¦ããã
ã§ä¾ãã°10é²æ³ã§è©³ç´°åº¦ãè¨ç®ãããªãã°ã
ä¸ã®æ¡ãè¶
ããªãåå大ããªåºæ°ã§è¨ç®ããã¨ã
(詳細度) = a * MAX(a, b, c)^2 + b * MAX(a, b, c) + c
ã§ç®åºåºæ¥ãã¿ããã§ãããããå¦ä½ãªãCSSã®å¦ä½ãªãã»ã¬ã¯ã¿ããä»®ã«åãã»ã¬ã¯ã¿ã ã¨ãã¦ã詳細度ã£ã¦ã®ã¯ããã¾ã§ç¸å¯¾çãªå¤ã«ãªãã ãã¿ããã§ããã*1
åºç¾é
ãã¼ã¹ãããé çªã§ããã
ã¾ã¨ã
ãã¼ãã¡ãã£ã¨ä»åº¦ããå°ã詳ããæ¸ãã§ããã
!importantã¨ããå²ãè¾¼ãã§ããã®ã§ãããå°ãä¸å¯§ã«èª¿ã¹ãªãã¨ã§ããã
*1:thanks id:amachang, id:cho45