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

136
Views
Lit: Overriding child component CSS given an @property field

I have a lit component (e.g tc-tooltip) where in some cases I'd like to remove its arrow by overriding its CSS as described in the shoelace docs

Is there a way to do this? I thought I could create a property in the lit component class e.g

@property({ type: Boolean })
hasArrow = true;

and to try to change the styles by checking for when the component's hasArrow property is set to false

removeArrow() {
   if (this.hasArrow === false) {
      styles.push(css`
        sl-tooltip::part(base) { --sl-tooltip-arrow-size: 0;" }`);
    }
    styles.push(prepareStyles(styles)):
  }

but I can't get it to work. Any tips appreciated!

about 4 years ago · Juan Pablo Isaza
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!