Styling
We don't inject any CSS into your application.
Instead, the card previsualization is shipped with a default minimal inline style.
If you need to adapt the look and feel, two can use one of the following strategies
CSS variables
You can use
CSS custom properties
to overwrite the default values:--microlink-background-color: #fff
--microlink-border-style: solid
--microlink-border-width: 1px
--microlink-border: 1px solid #e1e8ed
--microlink-color: #181919
--microlink-hover-background-color: #f5f8fa
--microlink-hover-border-color: #8899A680
--microlink-max-width: 500px
--microlink-border-style: solid
--microlink-border-width: 1px
--microlink-border: 1px solid #e1e8ed
--microlink-color: #181919
--microlink-hover-background-color: #f5f8fa
--microlink-hover-border-color: #8899A680
--microlink-max-width: 500px
CSS classes
When the microlink UI card is rendered, each subcomponent of the card has been assigned a
BEM
class name:- microlink_card
The root element of the card. - microlink_card__content_description
Theptag of the card description. - microlink_card__content_title
Theptag of the card title. - microlink_card__content_url
Thespantag of the card url link. - microlink_card__content
The wrapperdivaround the content preview. - microlink_card__media_audio_wrapper
The wrapperdivaround the audio preview. - microlink_card__media_audio
Theaudioelement for the audio preview. - microlink_card__media_image
Thedivholding thebackground-imageof the image preview. - microlink_card__media_video_wrapper
The wrapperdivaround the video preview. - microlink_card__media_video
Thevideoelement for the video preview. - microlink_card__media
The media element, regardless of the media type (video,image, etc.). - microlink_card__progress_bar
Thedivtag of the card progress. - microlink_card__spinner
Thedivtag of the loading spinner in the card.
For each SDK package there are some specific class names too: