Coder Social home page Coder Social logo

Comments (6)

isaaclyman avatar isaaclyman commented on May 18, 2024 2

@yyx990803 For posterity, can you clarify what :root and :scope do here? Are they the equivalent of :host in Angular 2 scoped styles? (referring to the component's tag itself, in a named component)

from vue-loader.

yyx990803 avatar yyx990803 commented on May 18, 2024

You need to use :root to refer to the root element.

from vue-loader.

yyx990803 avatar yyx990803 commented on May 18, 2024

Note in 3.0.0 it's changed to :scope

from vue-loader.

jdstaerk avatar jdstaerk commented on May 18, 2024

Hey, sorry for re-opening this topic, but I'd like to know that too. I can't find anything related to :root or :scope in the docs.

from vue-loader.

LinusBorg avatar LinusBorg commented on May 18, 2024

...which is because this comment was made about vue-loader 3.0.0 - we are 10 major versions beyond this now. scoped styles work differently now and this whole thread does not apply anymore.

from vue-loader.

blowsie avatar blowsie commented on May 18, 2024

I also ended up here...
How to achieve to following?

<style scoped>
:scope {
  --color: #000;
}
.link {
 color: var(--color);
}
</style>

from vue-loader.

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.