How do you customize the size of text in a Sharepoint List column using JSON?

Michael 1 Reputation point
2023-01-06T20:58:20.237+00:00

I'm currently using this JSON code to format the size of text in a Sharepoint list column:

{  
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",  
"elmType": "div",  
"debugMode": true,  
"txtContent": "@currentField",  
"style": {  
"font-size": "18pt"  
}  
}  

HOWEVER, I'm attempting to format a column in the SharePoint list to have 2 different font sizes.

Example:

I have a volume (bbl) column with the value 201.224 in an entry.

I'd like the numbers before the "." to be a larger font size here.

  1. (font size 18), 224 (font size 14)

If possible, what JSON code can I use for these results to appear?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,230 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Renjie Sun-MSFT 2,861 Reputation points Microsoft Employee
    2023-01-09T01:41:49.237+00:00

    Hi @Michael ,

    Thanks for the post.

    Per my research, it is not possible to custom one value font with two different font size.
    You can only use column formatting to make one value the same size.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.


  2. Kent A. Lewandowski 0 Reputation points
    2023-08-08T23:27:40.7033333+00:00

    I'd like to customize my List to make the column headers for certain fields (the ones I allow users to edit) appear different - different size and color, for instance, or else bold those headers. Is this possible?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.