Adding new tailwind breakpoints in NiceGUI #3606
-
QuestionI would like to add a new breakpoint prefix as xs wich is done in the theme.screens section of tailwind.config.js file like this: const defaultTheme = require('tailwindcss/defaultTheme')
module.exports = {
theme: {
screens: {
'xs': '475px',
...defaultTheme.screens,
},
},
plugins: [],
} Im just wondering how to adjust that whilst using NiceGUI, cant seem to find the tailwind.config.js file. In advance, thanks! :) |
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
Aug 27, 2024
Replies: 1 comment 3 replies
-
Hi @afusdev, You can extend Tailwind's breakpoints with some custom JavaScript like this: ui.add_body_html('''
<script>
tailwind.config.theme = {
extend: {
screens: {
xs: '475px',
},
},
};
</script>
''') |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
afusdev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @afusdev,
You can extend Tailwind's breakpoints with some custom JavaScript like this: