css-element-queries
css-element-queries copied to clipboard
Disable certain block
The plugin is working perfectly thank you for the great effort. I have a problem with the :hover
state of the block where I change its dimension. The performance become very sluggish and it's noticeable.
I believe the plugin tries to parse the selector:
.selector[max-width~="200"] {
height: 200px;
}
.selector[max-width~="200"]:hover {
height: 400px;
}
Since the class is already added to the element, is there a way to disable parsing CSS for the hover
state? Luckily I am handling one case which is width less than 200 so I overcame that by using .selector[max-width="200"]:hover
instead of the ~=
.
Thank you again.
Mh, I'm not sure what the issue here is. .selector[max-width~="200"]:hover
looks to me like a perfectly fine selector.
The performance become very sluggish and it's noticeable Can you provide a jsfiddle?
is there a way to disable parsing CSS for the hover state?
What do you mean with disable? Removing it disables it, so why don't you remove the entire rule if not needed?
The problem is that I am transitioning the height. During the transition the height change gradually causing the JS plugin to recalculate extensively. Is that clear?