Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support <general-enclosed> in @supports #894

Closed
nex3 opened this issue Nov 26, 2019 · 3 comments · Fixed by #1134
Closed

Support <general-enclosed> in @supports #894

nex3 opened this issue Nov 26, 2019 · 3 comments · Fixed by #1134

Comments

@nex3
Copy link
Contributor

nex3 commented Nov 26, 2019

See sass/sass#2780

@Ariane-B
Copy link

Ariane-B commented Jun 30, 2020

Hi! Since it looks like it'll be a while until this is supported, do you have ideas for a workaround in the mean time? Something that would allow me to do something like this:

  @mixin focus-hl {
    @supports selector(*:focus-visible) { outline: 1px solid red; }
  }

  div { @include focus-hl; }

@hyfydistro
Copy link

hyfydistro commented Oct 8, 2020

Hi! Since it looks like it'll be a while until this is supported, do you have ideas for a workaround in the mean time? Something that would allow me to do something like this:

  @mixin focus-hl {
    @supports selector(*:focus-visible) { outline: 1px solid red; }
  }

  div { @include focus-hl; }

Depends on the specifics.
e.g. color

            background-color:#000
            background-color: rgba(0, 0, 0, 0.6)

Most animations will have to be done by JavaScript and detected with. Otherwise use Modernizr and have a different class set upon it. I can't say this will solve most of the problems. It will limit how you can build your site.

Alternatively, build in a Progressive enhancement manner.

P.S. I'm still hoping they'd add some solution to it too.

@janwidmer
Copy link

is this supposed to work now?

@supports (:focus-visible) {
    &:focus {
      outline: none;
    }
  }

I am still getting an error SassError: Expected identifier:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants