Skip to content

How to override a FontAwesome icon's SVG? #3014

@matheusds365

Description

@matheusds365

Question

I tried:

#mdbook-theme-toggle > .fa-svg > svg {
    display: none;
}

#mdbook-theme-toggle > .fa-svg::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-image: url("../icons/theme-toggle.png");
    background-size: contain;
    background-repeat: no-repeat;
}

(I used a PNG just for testing out.)

Nothing.

Version

0.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-questionCategory: A question on how to do something

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions