Wajahat Qasim
Wajahat Qasim

Reputation: 70

Dynamic Css Media Query

@media (min-width: THIS-VALUE) {
.CLASS {
    Width: QUERY-WIDTH;
}

Is this Possible?
Please explain with example.
Thanks

Upvotes: 0

Views: 748

Answers (2)

Deep Jani
Deep Jani

Reputation: 1

It's not possible is CSS. you can use that in css pre-processors like Less, sass, SCSS, Stylus Etc.

in that case you can use % to set full size width.

Upvotes: 0

filype
filype

Reputation: 8380

This is probably an example of a css pre-processor. You can set variables in less that can be re-used throughout your css.

Less is a CSS pre-processor, meaning that it extends the CSS language, adding features that allow variables, mixins, functions and many other techniques that allow you to make CSS that is more maintainable, themable and extendable.

Check out a couple of options:

http://lesscss.org/

Upvotes: 1

Related Questions