Is there a way to get all valid keywords for a CSS property?

Second round. First was " How do I get all the supported CSS properties in WebKit? "

I am looking for a magic function CSSkeywords:

CSSkeywords('float') --> ['left', 'right', 'none']
CSSkeywords('width') --> ['auto']
CSSkeywords('background') --> [
  ["repeat", "repeat-x", "repeat-y", "no-repeat"], 
  ["scroll", "fixed"], 
  ["top", "center", "bottom", "left"],
  /*regexp for color*/,
  /*regexp for url*/,
  "none"
]
+3
source share
2 answers

You will have to write it yourself.

+3
source

A duplicate of this question was posted , to which I answered with the following . Post it here if another question is deleted.


, , - ( !), JavaScript, CSS. ( , .)

, CSS 2010 ( , ). CSS Basic User Interface Level 3 CR (, box-sizing), CR LC [ WD] - W3C.

. ( .) , , , ( ) , (W3C) (MDN) .

+1

Source: https://habr.com/ru/post/1741361/


All Articles