This is very helpful for limiting custom CSS to certain breakpoints. Usage examples are Scrollbar, Offset Slides and Offset Carousel Posts. Modify the breakpoints (the ones in px) to your needs.
Desktop & Tablet Only
@media only screen
and (min-device-width: 767px)
{
}
Mobile Only
@media only screen
and (max-device-width: 767px)
{
}
Example
/* WordPress Default Code Block Styling */
@media only screen
and (min-device-width: 767px)
{
.wp-block-code code {
font-size: 17px}
}
@media only screen
and (max-device-width: 767px)
{
.wp-block-code code {
font-size: 15px}
}