codyhouse / codyhouse-framework

A lightweight front-end framework for building accessible, bespoke interfaces.
https://codyhouse.co/
MIT License
1.16k stars 173 forks source link

troubles with aspect-ratios #132

Closed starchild closed 1 year ago

starchild commented 1 year ago

I'm trying to create to create two rows - the first with a 50% span, then two 25% spans - then the next row the reverse order.

Aspect ratios should be 2:1, 1:1:, 1:1 and then reverse order.

But, for some reason that I can't work out, it's just not working.

Can you tell me please what I'm doing wrong? I'm using v2.93 and have added the 2:1 css to the custom_styles.

Thank you :)


<div class="grid">
    <div class="col-6@md col-6@sm aspect-ratio-2:1"></div>
    <div class="col-3@md col-3@sm aspect-ratio-1:1"></div>
    <div class="col-3@md col-3@sm aspect-ratio-1:1"></div>
    <div class="col-3@md col-3@sm aspect-ratio-1:1"></div>
    <div class="col-3@md col-3@sm aspect-ratio-1:1"></div>
    <div class="col-6@md col-6@sm aspect-ratio-2:1"></div>
</div>
claudia-romano commented 1 year ago

Hi there, try adding the aspect-ratio class to a child of the col-n element. This way paddings won't get overwritten.

claudia-romano commented 1 year ago

I'm closing this issue as no additional info was provided. Feel free to reopen it if you are still experiencing the bug. Cheers!