codyhouse/codyhouse-framework

Issues with aspect-ratio

oppenheimer- opened this issue · 3 comments

Starting in Line 62 as of writing.

  1. The selector [class*="aspect-ratio"] is a bit too greedy imho, because it "hijacks" classes in my wordpress setup which unfortunately generates aspect-ratio classes in wp-embed as well. I vote for changing this into a a simple class of just ".aspect-ratio".

  2. In my stack the values for --aspect-ratio dont get converted into floats and therefore produce an insufficient padding rendering components invisible. Replacing "16/9" with "calc(16/9)" did the trick for me.

good point. We'll def look into this 👍

In v2.8.7 we're using a different selector: now we target only the classes that start with 'aspect-ratio'. If you create other classes in WP (e.g., wp-aspect-ratio...), they won't be affected by CodyFrame's util classes.

https://github.com/CodyHouse/codyhouse-framework/releases/tag/v2.8.7

About point 2: I couldn't recreate the bug. There's already a calc() in the padding-bottom property.

Now I see why it's preferred to have a calc() in the variable definition.

We've fixed this issue in v2.8.8:
https://github.com/CodyHouse/codyhouse-framework/releases/tag/v2.8.8