You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.
So far, this library has been great! Thanks for all the hard work!
I opened this issue but it might not be an 'issue' and might be more of a question.
Problem
I am trying to style the accordion <summary> element using word press as a headless CMS.
However, when trying to apply specific styles to the <summary> element "text-decoration: underline" it doesn't style the UI even though its in the CSS. This seems like a limitation of the <summary> element.
Solution
A solution to this, would be to make a pull request to add an HTML element between the text and the <summary> element. I see your demo for the accordion has a <p> element inside the <summary> element.
Question How'd that <p> tag get in there?
Was it from editing the HTML in WordPress for this accordion block? Cause if I do that, I get this validation issue: This block contains unexpected or invalid content. Having raw HTML in WordPress isn't a great solution for this anyways.
Anyways, I am just a little confused how the demo for the accordion has <p> tags inside the <summary> and how I can get that. Preferably without turning my entire accordion into HTML.
The text was updated successfully, but these errors were encountered:
The <p> element is added automatically as part of the RichText output in the summary title. I didn't need to edit the HTML or anything like that. You could target that for styles by doing something like .ab-block-accordion summary p { text-decoration: underline; }
Check out this article for more details about how to style certain elements in the block. The details/summary block can have some limitations because of how it relies on browser technology instead of external JS or CSS. Hope that helps!
So far, this library has been great! Thanks for all the hard work!
I opened this issue but it might not be an 'issue' and might be more of a question.
Problem
I am trying to style the accordion
<summary>
element using word press as a headless CMS.However, when trying to apply specific styles to the
<summary>
element "text-decoration: underline" it doesn't style the UI even though its in the CSS. This seems like a limitation of the<summary>
element.Solution
A solution to this, would be to make a pull request to add an HTML element between the text and the
<summary>
element. I see your demo for the accordion has a<p>
element inside the<summary>
element.Question How'd that
<p>
tag get in there?This block contains unexpected or invalid content
. Having raw HTML in WordPress isn't a great solution for this anyways.Anyways, I am just a little confused how the demo for the accordion has
<p>
tags inside the<summary>
and how I can get that. Preferably without turning my entire accordion into HTML.The text was updated successfully, but these errors were encountered: