Archived topic
Changing unsemantic grid breakpoints
3 replies · Started by Caroline on July 4, 2017
Hi Tom
I need to change the breakpoint at which the tablet classes kick in in the unsemantic grid stylesheet. I'm reluctant to do this in unsemantic-grid.css in the parent theme as my changes will be overridden next time there's a theme update.
Is it possible to create a second unsemantic-grid.css in my child theme folder which will override the one in the parent theme? Or a different solution? The only way I've found to fix this so far is by resetting some of the class values like this:
@media (min-width: 768px) and (max-width: 1215px) {
.grid-25 {
width: 50%;
}
}
to force the div to display at 50% even though the "grid-25" class is still being applied, which is just really inelegant and (ironically) totally unsemantic!
I'm aware this is more a general CSS question than a GeneratePress question but I'm tearing my hair out trying to find a solution so any help would be really welcome!
Thank you!
Caroline
Hi Caroline,
Currently, this is really difficult I'm afraid. Until I'm able to split the CSS into 3 separate files and add the media queries to the file call so they can be filtered (caching plugins prevent this from being done easily), the only two ways to achieve it are what you've already mentioned.
Thanks Tom - I suspected you might say that. I'll stick with what I've done in that case.
No problem - definitely something I'm actively trying to improve :)