You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently CSS is injected automatically via a tag inserted into the DOM.
It's also worth noting that the CSS is bundled by default, so there's no need to include any stylesheets to use the default theme. It's dyamically inserted before any other elements (like) stylesheets so it's super easy to override with your own styles.
This can be prevented with an empty link tag in the DOM, like below:
link(rel="stylesheet" id="alertifyCSS")
Whilst this works as expected to me it feels unsemantic to provide an empty link tag that is not actually doing anything.
Instead I think it would be a better option to provide an option to alertify that can prevent this injection from happening without having an empty link tag in the DOM. The benefit of this is that styles can be imported and bundled in the users build process via a module bundler such as Webpack if desired without cluttering the DOM. The link tag would still be the default behaviour unless otherwise specified.
Expected behavior
Link tag is automatically inserted into the DOM by default.
User can specify an option/call a method that prevents this from happening completely.
Actual behavior
Link tag is injected into the DOM unless it already exists.
Steps to reproduce the behavior
Import and run the module.
Version of Alertify in use
1.0.12
The text was updated successfully, but these errors were encountered:
Currently CSS is injected automatically via a tag inserted into the DOM.
This can be prevented with an empty link tag in the DOM, like below:
link(rel="stylesheet" id="alertifyCSS")
Whilst this works as expected to me it feels unsemantic to provide an empty link tag that is not actually doing anything.
Instead I think it would be a better option to provide an option to alertify that can prevent this injection from happening without having an empty link tag in the DOM. The benefit of this is that styles can be imported and bundled in the users build process via a module bundler such as Webpack if desired without cluttering the DOM. The link tag would still be the default behaviour unless otherwise specified.
Expected behavior
Link tag is automatically inserted into the DOM by default.
User can specify an option/call a method that prevents this from happening completely.
Actual behavior
Link tag is injected into the DOM unless it already exists.
Steps to reproduce the behavior
Import and run the module.
Version of Alertify in use
1.0.12
The text was updated successfully, but these errors were encountered: