Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

400
Views
Suppress Blazor css ::deep warning

In a css file of an asp.net Blazor app when I use ::deep VS emits a warning "Validation (CSS 4.0): "::deep" is not a valid pseudo-element." That might be true for regular CSS, but not in the context of a Blazor app.

Is there a way to suppress it? Right-click -> Suppress -> In File / In Source do nothing.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You can add deep to the vendor specific extensions.
I've added it to the Microsoft extension and it works.

Open with an editor (in Administrator mode) the file:
C:\Program Files (x86)\Microsoft Visual Studio\2019\<your version>\Common7\IDE\Extensions\Microsoft\Web Tools\Languages\Schemas\CSS\1033\css-vendor-ms.xml

Go to line ~69 and add the following code:

    <CssPseudo name="::deep"
             _locID="ms-browse-pseudo-element"
             _locAttrData="description"
             version="3.0"
             browsers="IE11"
             description="Blazor child component support."
             standard-reference="https://docs.microsoft.com/en-us/aspnet/core/blazor/components/css-isolation?view=aspnetcore-5.0"/>

Restart Visual Studio.

Now I can see the source code as:
Deep pseudo element

over 4 years ago · Santiago Trujillo Report

0

For Resharper users, editing the css-vendor-ms.xml is needed but does not completely solve the issue. Resharper will continue to highlight ::deep elements as errors in your solution. This is currently a known bug, which will hopefully be resolved in a future build.

As a work around, go to Resharper Options --> Code Inspection --> Inspection Severity --> CSS --> Potential Code Quality Issues --> Unknown CSS symbol and drop the severity to Warning (or lower).

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!