Skip to content

Can I use media queries in "globalStyle"? #1382

Answered by tomahl
leo-petrucci asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @leo-petrucci,

Just follow the docs here and replace style() with globalStyle().

globalStyle('div[data-radix-popper-content-wrapper]', {
	transform: 'translate3d(0px, 0, 0px)!important',
	width: '100%',
	bottom: 0,
	top: 'auto!important',
	maxWidth: 768,
	
	'@media': {
		'screen and (min-width: 768px)': {
			// responsive styles
		},
	},
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@leo-petrucci
Comment options

Answer selected by leo-petrucci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants