@tuanphan
Your solution works like a charm for embedding Cookie Script’s cookie report java script inside an accordion (List of Cookies, at the bottom of the page). I do however have a problem with the mobile view, and potentially the tablet one. It will not scale to fit the screen, half the text is missing. Scale needs to occur on this particular accordion and “child”. The other accordions, without script, scale properly. I suspect something in the CSS but can’t figure it. Desktop view from computer and mobile looks fine.
Additional question on styles
How can I change the fonts of the cookie report, let say to ariel 10, weight 100. Despite setting the Design in accordion as Paragraph 2, same as the other accordions, it uses another font, probably the script’s default.
Squarespace 7.1 business plan, https://www.tsiricos.gr/en/privacy
EDIT
72hs straight later, I managed to divinite a solution that works 100% by specifying font properties on script block and manually resizing the fonts for mobile view only.
However, If there is a more elegant solution whereby text scales automatically depending the resolution as is the case with squarespace text blocks, I would be very interested to know it as this would solve any unforeseen future problems with different resolutions.
Solution : Insert code in CSS, altering block #, font and values accordingly
/* COOKIE SCRIPT REPORT ACCORDION */
/* General Font cookie report script */
div#block-yui_3_17_2_1_1675447221528_20915 {
font-family: "neue-haas-grotesk-display";
font-weight:100;
font-size:.9em;
text-transform:none;
letter-spacing:.0em;
margin-top:4px;
margin-bottom:10px;
}
/* mobile view cookie report size font */
@media only screen and (max-width: 640px) {
div#block-yui_3_17_2_1_1675447221528_20915 {
font-size: .4em;
max-width: 100%;
}
}
/* END COOKIE SCRIPT REPORT ACCORDION */