Skip to content

Installation

Andrew Dzobko edited this page Jul 23, 2023 · 5 revisions

To add the library to your project, we recommend utilizing the CSS layers feature and putting AD-Elements into the least important layer. This will ensure that any overrides you make take priority over this stylesheet and that you will not have to use !important for no reason. To do that, create a master CSS file that will include imports of this library, as well as your styles. The final file should look something like this:

@layer ADE, my-styles;

@import url("https://cdn.jsdelivr.net/gh/Collert/AD-Elements@latest/main.css") layer(ADE);
@import "/path/to/your/stylesheet.css" layer(my-styles);

Afterwards, link this layers file as the main stylesheet in your HTML

<link href="/layers.css" rel="stylesheet">

This should activate AD-Elements, as well as give you the opportunity to easily apply your own styles, as well as override the predefined classes.

Clone this wiki locally