Skip to content

Breakpoint variants are not sorted properly #778

@impcyber

Description

@impcyber

Config:

unocss.config.ts
export default defineConfig({
...
  theme: {
    breakpoints: {
      'xs': '320px',
      'sm': '640px',
      'md': '768px',
      'lg': '1024px',
      'xl': '1280px',
      '2xl': '1536px',
      'xxl': '1536px',
    },
...
})

HTML code:

<template>
  <div class="grid xs:grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5">
    <Item v-for="(item, index) in products" :key="index" :item="item" />
  </div>
</template>

Result:
image

Playground

xs breakpoint has the highest priority with the lowest value

UPD: If i will add custom breakpoints with same values, then the order becomes correct

Playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions