I use md:bg-pink and it become like this:
enter image description here
This is my unocss.config.ts:
export default defineConfig({
shortcuts: [
{...},
],
rules: [],
theme: {
colors: {...},
screens: {
md: {'max': '1800px'}
},
breakpoints: {
md: {'max': '1800px'}
},
},
presets: [
presetUno(),
presetAttributify(),
presetIcons({
scale: 1.2,
}),
],
});
I want to set max-width to replace the default min-width, but it doesn't work
Short answer: You must use
lt-wherever you need to apply less thenbreakpoint.Long answer: Your config is still the same. You may want to change actual
pxvalue, tho. So ifmdis 1800px than you may use it as 1800px(included) and more OR you may use the same 'md' as 1800px(not included) and less (better set to 1800.1px instead).Then to apply styles at this breakpoint (i.e. 1800px) you should write next:
additional info: https://unocss.dev/presets/wind
Applying inline styles you should follow this:
additional info: https://windicss.org/utilities/general/variants.html