-
Notifications
You must be signed in to change notification settings - Fork 756
Open
Labels
Description
I propose add to CSS specification "defines" known from pascal or C++.
I propose:
for selectors:
@define selector textish
{
input[type="text"], input[type="mail"], input[type="url"]
}
usage in code:
body>$textish will be equivalent of:
body>input[type="text"], body>input[type="mail"], body>input[type="url"]
$textish.mainform will be equivalent of:
input[type="text"].mainform, input[type="mail"].mainform, input[type="url"].mainform
for properties:
@define block framed
{
border: 2rem solid #000;
border-radius:10rem;
}
usage:
body>ul
{
block: framed;
background: white;
}
will be equivalent:
body>ul
{
border: 2rem solid #000;
border-radius:10rem;
background: white;
}
What do you think about this proposal? Is it possible to add this or similar solution to selectors level 4?
It is my proposal for innovation in CSS (for people that use SCSS an SASS) and for needs of developers to write less code like here #2296
I think that creation more specific pseudoclasses is no innovation and it make the solution less flexible.