question

JenPotter-2375 avatar image
0 Votes"
JenPotter-2375 asked CaseyYangMSFT-4714 commented

sharepoint json format view row color

I need to create a list that has a row with a black background and white text with no hover effect. Just all black - always. Right now I'm getting light grey background when hovering over a row. Can this be changed? I have the following:

 {
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
   "additionalRowClass": {
     "operator": ":",
     "operands": [
       {
         "operator": "==",
         "operands": [
           {
             "operator": "%",
             "operands": [
               "@rowIndex",
               2
             ]
           },
           0
         ]
       },
       "ms-bgColor-neutralPrimaryAlt sp-css-color-WhiteText",
       {
         "operator": ":",
         "operands": [
           {
             "operator": "==",
             "operands": [
               {
                 "operator": "%",
                 "operands": [
                   "@rowIndex",
                   2
                 ]
               },
               1
             ]
           },
           "ms-bgColor-neutralPrimaryAlt sp-css-color-WhiteText",
           ""
         ]
       }
     ]
   }
 }
office-sharepoint-onlinesharepoint-dev
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your question. We are currently looking into this issue and will give you an update as soon as possible. Thank you for your understanding and support.

0 Votes 0 ·

1 Answer

CaseyYangMSFT-4714 avatar image
0 Votes"
CaseyYangMSFT-4714 answered CaseyYangMSFT-4714 commented

Hi @JenPotter-2375,

Per my research, you could use some deleloper tools to find custom SharePoint CSS classes that you need to overwrite to change the colour of the hovering. For example .ms-welcome-hover and .ms-siteactions-hover are the welcome hover class obviously being the top bar for the page.

Then you could use the following code to change the hover color:

    .ms-siteactions-hover
     {
         background-color:#000000;
         color:#FFFFFF;
     }

For Reference:
How to remove the Hover /or chage the hover color, when moving the mouse over the current username
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JenPotter-2375,

I'm checking how the things are going on about this issue. Is there any progress on this issue?

0 Votes 0 ·