-
Im a beginner, and i can't make the Icon on the same line, they display like this.
|
Beta Was this translation helpful? Give feedback.
Answered by
HiDeoo
Apr 27, 2024
Replies: 1 comment 3 replies
-
👋 You should be able to target the specific icons you wish to display inline by passing a custom CSS class to the icon component: text <Icon name="star" class="inline-icon /> Then, you would need to add custom CSS styles for this new class by specifying a path to a CSS file in export default defineConfig({
integrations: [
starlight({
title: 'Your docs',
customCss: [
+ // Relative path to your custom CSS file.
+ './src/styles/custom.css',
],
}),
],
}); And in .sl-markdown-content .inline-icon {
display: inline;
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
vhtmui
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👋 You should be able to target the specific icons you wish to display inline by passing a custom CSS class to the icon component:
Then, you would need to add custom CSS styles for this new class by specifying a path to a CSS file in
astro.config.mjs
:And in
src/styles/custom.css
, add a style for the.inline-icon
class to display the icon inline: