Skip to content

Document importing Hopper's CSS on a layer #158

@alexasselin008

Description

@alexasselin008

A number of developers have encountered difficulties when trying to overwrite Hopper's CSS styling with their own. The standard practice of simply importing Hopper's CSS into the main stylesheet often leads to issues where Hopper's styles take precedence over custom styles due to CSS specificity and source order.

The solution to this problem is to use layers.
This allows developers to import Hopper's css into a specific layer, making it easier to manage styling precedence.

@import url("@hopper-ui/icons/index.css") layer(design-system)

we should document this standard pratices in our documentation

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions