Skip to content

Commit

Permalink
Merge pull request #246 from UCDavisLibrary/sp-brand-box
Browse files Browse the repository at this point in the history
fix bug with brand box float width #244
  • Loading branch information
spelkey-ucd authored Jun 6, 2023
2 parents 47309a7 + 9165115 commit a6640a1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
14 changes: 14 additions & 0 deletions src/public/scss/custom-blocks.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@media (min-width: 768px) {
.brand-textbox.u-align--right, .brand-textbox.u-align--left, ucd-theme-brand-textbox.u-align--right, ucd-theme-brand-textbox.u-align--left {
max-width: 33%;
min-width: auto !important;
}
}
.brand-textbox.u-align--right, .brand-textbox.u-align--left, ucd-theme-brand-textbox.u-align--right, ucd-theme-brand-textbox.u-align--left {
min-width: 100%;
}

.ucd-block-heading-with-icon {
padding-left: var(--o-box-spacer);
--o-box-spacer: var(--o-box-spacer-default, 0.75rem);
}
5 changes: 1 addition & 4 deletions src/public/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
@use '@ucd-lib/theme-sass/css-properties.scss' as cssProps;

@use './block-shims.scss' as blockShims;
@use './custom-blocks.scss' as customBlocks;
@use './watercolors.scss' as waterColors;

@use 'slick-carousel/slick/slick.scss' as slick;

.ucd-block-heading-with-icon {
padding-left: var(--o-box-spacer);
--o-box-spacer: var(--o-box-spacer-default, 0.75rem);
}
2 changes: 1 addition & 1 deletion theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
* Author: UC Davis Library Online Strategy
* Author URI: https://library.ucdavis.edu
* Description: A Wordpress version of the UC Davis Sitefarm One theme
* Version: 3.3.0
* Version: 3.3.1
*/
15 changes: 7 additions & 8 deletions views/blocks/brand-textbox.twig
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{% set brandColor = attributes.brandColor ? attributes.brandColor : 'admin-blue' %}
{% if attributes.collapsible %}
<ucd-theme-brand-textbox
brand-color={{attributes.brandColor ? attributes.brandColor : ''}}
<ucd-theme-brand-textbox
brand-color={{brandColor}}
{{attributes.collapsible ? 'collapsible'}}
class="{{attributes.float ? 'u-align--'~attributes.float}}">
{{attributes.float ? 'style="max-width:33%;" '}}
<div class="category-brand__background colored-section {{attributes.brandColor ? 'category-brand--'~attributes.brandColor}}">
<div class="category-brand__background colored-section {{brandColor ? 'category-brand--'~brandColor}}">
{{content}}
</div>
</ucd-theme-brand-textbox>
{% else %}
<section
class="colored-section brand-textbox category-brand__background {{attributes.brandColor ? 'category-brand--'~attributes.brandColor}} {{attributes.float ? 'u-align--'~attributes.float}}"
{{attributes.float ? 'style="max-width:33%;" '}}>
<section
class="colored-section brand-textbox category-brand__background {{brandColor ? 'category-brand--'~brandColor}} {{attributes.float ? 'u-align--'~attributes.float}}">
{{content}}
</section>
{% endif %}
{% endif %}

0 comments on commit a6640a1

Please sign in to comment.