Introduction
Hello everyone, I work on SharePoint, so I like to play around. This time I thought maybe I pen down my learnings and findings. This is my first blog so I will try to start with less complicated stuff.
This blog is about SPFx and my findings. I cannot write everything in one blog, so I have created a series, and this is the first in that series.
Warning suppression in SPFx
I was working on one of the projects where I wanted to use office fabric 7 but as you know scaffolding gives you only fabric 6 for now, so I went ahead and updated the fabric version. I thought things will break but it worked fine for me. I tested this on classic page, and I found some styling issues. OOB css from corev15 was overriding few of fabric CSS. To fix that it was simple, I just reset it to default in my SPFx scss file. Below is the few sample css changes:
- :global{
- .ms-core-tableNoSpace{
- width: 80%;
- }
- .ms-Callout-container{
- input[type=button], input[type=reset], input[type=submit], button {
- min-width: initial;
- margin-left: initial;
- }
- input, select, label, textarea, button, option {
- vertical-align: initial;
- }
- input[type=button]:active, input[type=reset]:active, input[type=submit]:active,
- input[type=button]:hover, input[type=reset]:hover, input[type=submit]:hover {
- border-color: initial;
- background-color:initial;
- }
- button:hover{
- border-color: rgba(0,0,0,0);
- }
- }
- }
- .customWebpart {
- input[type=password], input[type=text], input[type=file], input:not([type]), select, textarea, .sp-peoplepicker-topLevel, .sp-peoplepicker-topLevelDisabled, .sp-peoplepicker-autoFillContainer, .ms-inputBox {
- border:initial;
- }
- input[type=button], input[type=reset], input[type=submit], button {
- min-width: initial;
- margin-left: initial;
- }
- input, select, label, textarea, button, option {
- vertical-align: initial;
- }
- input[type=button]:hover , input[type=reset]:hover, input[type=submit]:hover, button:hover,
- input[type=button]:active, input[type=reset]:active, input[type=submit]:active, button:active,
- :not(:global(.ms-Button:hover)),:not(:global(.ms-Button:active)) {
- border-color: initial;
- background-color:initial;
- }
- }
Join the conversation! Your thoughts help the community grow.