CSS Feature Request: :last-child & clamp()

I was putting together a looper FAQ/accordion. Each item is separated with a line.

  1. Could there be a quick click to remove the border on the $el:last-child? Not that the CSS is difficult or time consuming, but it’d save some time if you could click on the border width and have a :last-child field.

  2. Would it be possible to add clamp() to font sizes? It’s a really nice feature and very smooth!

Hello @splaquet,

Thanks for writing in!

1.) Regretfully the Accordion element has NO setting to remove the border of the last item. Only CSS $el:last-child can be use here if you want to get rid ot that border.

2.) Yes, you can use clamp(14px, 10vw, 108px) for the font sizes. Check out this short video tutorial here:
https://www.youtube.com/watch?v=kqM1r5MXnsg

Best Regards.

  1. I’ve been unable to remove the border for the last child on a loop. It was easy when the FAQ items were manually added to the accordion, but I’m having issues now. Using $el:last-child seems to be all or nothing.

Any ideas?
https://bradleyairport.com/learn/faq/

  1. Thank you so much for the heads up on clamp()!!! I wasn’t aware that we could enter that into the field.

Hey @splaquet,

You may need to double-check your custom element CSS or where you added your custom inline css.

Only use $el:last-child if this was added to the Accordion item and not on the Accordion settings.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.