Prevent Zurb Foundation from interfering with .ccm-ui
Permalink
Howdy! How do you best prevent Foundation styles from interfering with concrete5's user interface?
For example, there's a height defined for elements, which messes up the Search input field when adding blocks. Then there's defined on *, which messes up the Redactor Save&Cancel buttons.
I found some pointers in this discussion:https://www.concrete5.org/community/forums/themes/concrete5foundatio... and added some override accordingly:
Since there are a lot of points where Foundation styles interfere with the ccm-ui (in 5-7.5.13), I'm wondering if there is a smarter way to prevent this from happening on a more global level?
For example, there's a height defined for
[type="text"]
box-sizing: inherit;
I found some pointers in this discussion:https://www.concrete5.org/community/forums/themes/concrete5foundatio... and added some override accordingly:
/* CCM UI Fixes * Elements in the CCM forms are styled by the Foundation CSS and we need to restore the default CCM styling here */ .ccm-ui input, .ccm-ui textarea, .ccm-ui select, .ccm-ui .uneditable-input, [type="text"] { height: inherit; } div#ccm-block-fields select { background-color: #ffffff !important; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-size: 13px;
Viewing 15 lines of 25 lines. View entire code block.
Since there are a lot of points where Foundation styles interfere with the ccm-ui (in 5-7.5.13), I'm wondering if there is a smarter way to prevent this from happening on a more global level?
Cheers! Yes, it's a custom theme. So far I only have the usual .ccm-page wrapper.
Do you suggest adding another wrapper div around the page? Or adding a .foundation class to the existing wrapper?
What's the best way to wrap the Foundation css so it only applies to elements within the wrapper?
Do you suggest adding another wrapper div around the page? Or adding a .foundation class to the existing wrapper?
What's the best way to wrap the Foundation css so it only applies to elements within the wrapper?
I have my own framework and wrap my code:
CSS is: .wrapper .header{stuff}, .wrapper .logo{stuff}, .wrapper .content{stuff}, etc.
<body> <div class="<?php echo $c->getPageWrapperClass()?>"> <div class="wrapper">
CSS is: .wrapper .header{stuff}, .wrapper .logo{stuff}, .wrapper .content{stuff}, etc.
Thanks for replying.
The problem with my current setup is that I import Foundation in my header_top like so.
When imported that way, it applies to everything, including ccm-ui elements.
I'm not sure how to load Foundation so that is applying only to elements within the wrapper. I see the following possibilities, but I'm not quite sure which is the best way.
- rename foundation.css to foundation.less and then wrap everything in the .wrapper-class or something like :not(.ccm-gui)
- import foundation.less into my main.less like so
The problem with my current setup is that I import Foundation in my header_top like so.
When imported that way, it applies to everything, including ccm-ui elements.
I'm not sure how to load Foundation so that is applying only to elements within the wrapper. I see the following possibilities, but I'm not quite sure which is the best way.
- rename foundation.css to foundation.less and then wrap everything in the .wrapper-class or something like :not(.ccm-gui)
- import foundation.less into my main.less like so
div.ccm-page { @import "foundation.less"; }
Maybe try just using
Then in main.less
In foundation.less
Try not wrapping either:
<?php echo $html->css($view->getStylesheet('main.less'))?>
Then in main.less
@import "foundation.less"; .ccm-page { /*Theme css stuff without any wrapping. */ body { background-color: @body-background-color; } /*etc*/ }
In foundation.less
Try not wrapping either:
input{stuff} textarea{stuff} select{stuff} foundation{stuff}
Have you used a 'wrapper' around your page code?