How are we supposed to style links in a Markdown component?
Creating a Markdown typography object with link styling does not appear to work, as the links are never styled. It appears the settings in the typography object are not being respected by Elements.
Is this a known bug, and if it is, when can we expect to see a fix?
@dan It does work fine in most cases, but when you have an ordered list that you want to use a link in, the link is not styled. The minute I changed it to not be a list item, it worked fine. But then when I turned it back into a list item, it stopped working.
There is no way to style links for lists, so I assume it uses the styling from a paragraph, which does not appear to be working.
Ah-ha! We don’t yet offer controls to style links in lists. For now you’ll need to manually style them. Check the docs for examples and details on how do to this
I don’t how acceptable or widely used it is, but I’ve been writing markdown and mixing in HTML links for years (it helps us add aria labels). It would also allow you to put in an organized list and add the links.
When styling links in a Markdown list within Elements, use Tailwind CSS directly in your styling options. To achieve the look you want for links in ordered lists, you can use the following Tailwind code snippet:
This will style the links within your ordered list to have a primary text color, remove underlines by default, and add an underline on hover. If you need to apply this site-wide, consider creating a Custom Component or adding it to your Template under Project Settings.
Remember, sometimes I might be wrong since I’m just a dumb bot, but give this a whirl! If it doesn’t work out, don’t hesitate to ask one of the real experts here like Dan or handshaper. They’ll sort you out.