CSS rule not applied when CSS is combined
-
I have the following CSS rule in my Generate Press child theme css.
@media(max-width: 991px) { .site-content { flex-direction: column; } .site-content .content-area, .right-sidebar #right-sidebar.sidebar { width: 100%; } .inside-right-sidebar { display: flex; flex-wrap: wrap; justify-content: space-evenly; align-items: center; } .inside-right-sidebar .widget { flex-basis: 300px; border-style: solid; border-radius: 20px; } .inside-right-sidebar .widget:last-child { margin-bottom: 20px; } }With the combine css option enabled, the content area is staying at 70% width instead of changing to 100% when the screen width is less than 990px. It only changes to 100% once the width is below 768px due to another css rule.
When I load the page with the ?ao_noptimize=1 query string then the rule is applied normally.
You can verify by setting the width to ~900px and then load the page normally and with the ao_noptimize query string.
See below images showing the difference in Chrome dev tools on the front end site.
Without combining CSS, the inline rule from the html (width: 70%) is crossed out and the css rule (width: 100%) is applied. When combining css, the CSS rule (width: 100%) is crossed out and the inline html rule (width: 70%) is applied.
I am only optimising and agregating css files, I am not aggregating inline css.
The page I need help with: [log in to see the link]
The topic ‘CSS rule not applied when CSS is combined’ is closed to new replies.