function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bhuvanakruthi MudholeBhuvanakruthi Mudhole 

css code for the following visualforce code for lightning

<apex:page standardController="YW_Solutions__c" lightningStylesheets="true">
<apex:slds />
<apex:includeLightning />
<apex:pageBlock >
<apex:pageBlockSection columns="2">
<apex:pageblocksection title="Trench Work Detail">
<apex:outputField value="{!YW_Solutions__c.Excavated_Length_m__c}"/><br/>
<apex:outputField value="{!YW_Solutions__c.Backfilled_Length_m__c}"/><br/>
<apex:outputField value="{!YW_Solutions__c.Reinstated_Length_m__c}"/><br/>
</apex:pageblocksection>
<apex:pageblocksection title="Single Excavation Detail">
<apex:outputField value="{!YW_Solutions__c.Total_Number_of_Open_Excavations__c}"/><br/>
<apex:outputField value="{!YW_Solutions__c.Total_Number_of_Excavations_Backfilled__c}"/><br/>
<apex:outputField value="{!YW_Solutions__c.Total_Number_of_Excavation_Reinstated__c}"/><br/>
</apex:pageblocksection>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
Shruti SShruti S
Are you expecting this page to have a Lightning look and feel in Classic ? If so NO.

Points to remember:
1. Adding lightningStylesheets=true doesn't have any impact on the Visualforce page when previewed in Classic
2. lightningStylesheets=true will be applicable to a Visualforce pag when you view it in Lightning Experience ONLY
3. When you use lightningStylesheets=true, you don't have to use apex:slds or apex:includeLightning
Waqar Hussain SFWaqar Hussain SF
Use below code. Make sure you are switched to lightning. You can switch to Lightning by clicking Swithch to Lightning Experience link on top right.
 
<apex:page standardController="YW_Solutions__c" lightningStylesheets="true">
  	<apex:slds />
    <apex:pageBlock>
        <apex:pageBlockSection columns="2">
            <apex:outputText label="Trench Work Details" value=""></apex:outputText>
            <apex:outputText label="Single Excavation Details" value=""></apex:outputText>
            <apex:outputField value="{!YW_Solutions__c.Excavated_Length_m__c}" />
            <apex:outputField value="{!YW_Solutions__c.Total_Number_of_Open_Excavations__c}" />
            <apex:outputField value="{!YW_Solutions__c.Backfilled_Length_m__c}" />
            <apex:outputField value="{!YW_Solutions__c.Total_Number_of_Excavations_Backfilled__c}" />
            <apex:outputField value="{!YW_Solutions__c.Reinstated_Length_m__c}" />
            <apex:outputField value="{!YW_Solutions__c.Total_Number_of_Excavation_Reinstated__c}" />
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>