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

Css not being read in Vue Single File Component #26

Open
akinhwan opened this issue Mar 3, 2018 · 9 comments
Open

Css not being read in Vue Single File Component #26

akinhwan opened this issue Mar 3, 2018 · 9 comments

Comments

@akinhwan
Copy link

akinhwan commented Mar 3, 2018

I have included the following css, but am still seeing the dynamically generated style for the .typed character as color: #000 black
.vue-typer{ font-family: 'Space Mono', monospace; } .vue-typer .custom.char.typed{ color: #FFF !important; }

@akinhwan
Copy link
Author

akinhwan commented Mar 3, 2018

oddly enough .vue-typer { font-family: monospace; } is working, but none of my more specific selectors are working

@akinhwan
Copy link
Author

akinhwan commented Mar 3, 2018

I figured it out...you need to remove scoped from style tag for vue single file components. This should definitely be mentioned in the docs, was about to bash my head in ;)

@wowtrxqn
Copy link

I figured it out...you need to remove scoped from style tag for vue single file components. This should definitely be mentioned in the docs, was about to bash my head in ;)

is not work

@thooyork
Copy link

thooyork commented May 5, 2019

try the prefix /deep/ like so:

/deep/ .typed{
color:rgb(255,255,255);
}

@headStyleColorRed
Copy link

I figured it out...you need to remove scoped from style tag for vue single file components. This should definitely be mentioned in the docs, was about to bash my head in ;)

Jesus Christ! Thank You!
I just created another pair of style tags underneat without the scope, as you said, and it worked instantly. Genious hahah :D

@GeorgeFlorian
Copy link

/deep/ is being deprecated so we will have to use ::v-deep instead and also !important

If you still want to use scoped which is recommended, you need to do it like this:

  ::v-deep .typed {
    color: #fff !important;
  }

That is the only thing that allowed me to set CSS rules to it.

@sumihiro
Copy link

my best solution is

::v-deep .vue-typer {
  .custom.char.typed {
    color: #fff;
  }
}

@Larkify
Copy link

Larkify commented Oct 5, 2021

I figured it out...you need to remove scoped from style tag for vue single file components. This should definitely be mentioned in the docs, was about to bash my head in ;)

Thank you sooooo much...... couldn't figure it out AT ALL.

@TavaresDylan
Copy link

my best solution is

::v-deep .vue-typer {
  .custom.char.typed {
    color: #fff;
  }
}

It works for me , thanx 🙂

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

No branches or pull requests

8 participants