question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat(ion-alert): add shadow parts

See original GitHub issue

Prerequisites

Describe the Feature Request

The ability to override ion-alert globally by using shadow parts.

Describe the Use Case

The ability to override ion-alert globally by using shadow parts.

Describe Preferred Solution

expose parts for native, backdrop, content, header, message and buttons

example for part native:

ion-alert::part(native) {
   .alert-head {
       //some css styling
   }
    .alert-head {
       //some css styling
   }
    .alert-message {
       //some css styling
   }
   .alert-button-group {
       //some css styling
      button {
       //some css styling
       }
   }
}

Describe Alternatives

Currently you have to provide cssClass to every ion-alert.

The following example is not working with all css properties:

ion-alert .alert-wrapper {
   //some css styling
}

Related Code

No response

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DwieDimacommented, Mar 16, 2022

oh my bad, changing the css properties to

border-radius: 5px !important;
  --max-width: 335px;

did the trick.

sorry, I’ll close the ticket!

0reactions
ionitron-bot[bot]commented, Apr 15, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

feat: add shadow parts to the public API · Issue #20916
Add Shadow Parts to the public API & documentation. Issue to include documentation: ionic-team/ionic-docs#1343. The text was updated ...
Read more >
Customize your Ionic Framework app with CSS Shadow ...
Shadow parts make it easier to theme and customize Ionic Framework components. They replace the need for a large amount of CSS variables...
Read more >
ion-item-divider
shadow. Item dividers are block elements that can be used to separate items in a list. They are similar to list headers, but...
Read more >
ionic/docs/core.json
14, "docs": "An Action Sheet is a dialog that displays a set of options. It appears on top of the app's content, and...
Read more >
Top 30 Ionic Interview Questions & Answers 2022
IONIC is just an HTML5 framework that allows web developers to create hybrid mobile ... CSS, and JavaScript (like Custom Elements and Shadow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found