SPFx - CSS for property pane
-
13-01-2021 - |
Frage
I've created a SPFx web part called "Human Resources Announcements." However, the name is too long for the property pane title to hold all of its value in one line.
How would I add custom CSS to the property pane?
I've tried adding to the .scss file for my web part
.propertyPane {
.propertyPanePageTitle {
font-size: $ms-font-size-m;
}
}
but this doesn't do anything
Lösung
I had similiar issue with the FabricUI:Dialog. The CSS will be overwritten or ignored. I ended up to use a "normal" css file and overwrite the css in the "traditional" way ;-)
- Add a normal css file to your project (e.g. propertyPane.css under /components)
Add your CSS without the Class-Wrapper
.propertyPanePageTitle { font-size: /* you have to use normal css */; }
include the CSS-file into your project (e.g. HumanResourcesAnnouncements.tsx)
require("./propertyPane.css");
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange