UCDavisLibrary / ucdlib-theme-wp

Wordpress theme port of the UC Davis SiteFarm One Theme
2 stars 0 forks source link

Float option for background-color block #118

Closed spelkey-ucd closed 2 years ago

spelkey-ucd commented 2 years ago

Kimmy would like the background-color block to have the option to float it right or left.

This functionality is already implemented in the brand-textbox block, so you can look there for the pattern. Basically, you just need to apply the u-align--right or u-align--left class and set the max-width to 33%.

The editor-side display doesn't need to actually float - it can stay as a 100% width block.

UcDust commented 2 years ago

Hi @spelkey-ucd,

Should we disable the 100%/full width control if a float is set, and vice-versa, if the 100% is chosen the float goes back to normal?

spelkey-ucd commented 2 years ago

yep

UcDust commented 2 years ago

Hi @wrenaria, this should be in sandbox and ready for test now.

wrenaria commented 2 years ago

Looks good to me!

wrenaria commented 2 years ago

I've discovered a problem! This is what float looks like on mobile:

This is not ideal. The float feature probably ought to either [1] take up 50% of the space at mobile sizes (<768ish px) with text continuing to wrap around it [or 2] stop floating left/right and become full width again on small device/mobile views.

I think maybe I'm inclined toward 1 but am okay with either solution.

UcDust commented 2 years ago

Good call! We can go with option 1.