Giter VIP home page Giter VIP logo

Comments (3)

andy-hook avatar andy-hook commented on May 16, 2024

Agree with the request, though the biggest blocker is native @custom-media support. Without it we'd need to provide a build configuration / step for compiling the polyfill, which prompts DX and technical questions.

from themes.

jd-carroll avatar jd-carroll commented on May 16, 2024

Not sure I follow, if you try building themes with the breakpoints.css as listed above I believe the @custom-media correctly picks up the breakpoint variables.

For example, this:

@media (min-width: 520px) {
    .rt-AvatarRoot.xs\:rt-r-size-1 {
      --avatar-size: var(--space-5);
      border-radius: max(var(--radius-2), var(--radius-full));
      --avatar-font-size-one-letter: var(--font-size-2);
      --avatar-font-size-two-letters: var(--font-size-1);
      letter-spacing: var(--letter-spacing-1);
    }

Becomes this:

@media (min-width: var(--breakpoint-xs)) {
    .rt-AvatarRoot.xs\:rt-r-size-1 {
      --avatar-size: var(--space-5);
      border-radius: max(var(--radius-2), var(--radius-full));
      --avatar-font-size-one-letter: var(--font-size-2);
      --avatar-font-size-two-letters: var(--font-size-1);
      letter-spacing: var(--letter-spacing-1);
    }

But I have been very wrong before, so I may likely be missing something.

from themes.

jd-carroll avatar jd-carroll commented on May 16, 2024

Wrong yet again...

Turns out this isn't valid syntax:

@media (min-width: var(--breakpoint-xs)) {

There is a proposal to support a version of this syntax:
https://drafts.csswg.org/css-env-1/

But alas, I understand your comment now 😅

Closing for now, as any build changes to support this are beyond my original intent

from themes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.