Is it possible to change line spacing in Sketch theme?
-
Hi! I am wondering if it is possible to change the line spacing in Sketch theme? Default spacing appears to be 1.5 or double spacing. NOT site wide, but In PORTIONS of my text I would like to use single spacing.
thanks for the help.
shannonThe blog I need help with is: (visible only to logged in users)
-
Hi Shannon,
The simplest way to do this is to create a new class in your Custom CSS, then add that class to portions of text within your HTML/Text editor of posts and pages.
Add this CSS in your Customizer:
.150spacing{ line-height: 150% } .200spacing{ line-height: 200%; }Now whenever you want a portion of text to be 1.5 spacing, use the class “150spacing”. If you want double-spaced, use the class “200spacing”.
Here’s how that works. Let’s say I have a post with this text:
These are the voyages of the Starship Enterprise. Its continuing mission, to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no one has gone before. We need to neutralize the homing signal. Each unit has total environmental control, gravity, temperature, atmosphere, light, in a protective field. Sensors show energy readings in your area. We had a forced chamber explosion in the resonator coil. Field strength has increased by 3,000 percent. I have reset the sensors to scan for frequencies outside the usual range. By emitting harmonic vibrations to shatter the lattices. We will monitor and adjust the frequency of the resonators.If I want the middle paragraph to use my new 200spacing class, I’ll use the Text post editor and edit to this:
These are the voyages of the Starship Enterprise. Its continuing mission, to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no one has gone before. We need to neutralize the homing signal. <div class="200spacing">Each unit has total environmental control, gravity, temperature, atmosphere, light, in a protective field. Sensors show energy readings in your area. We had a forced chamber explosion in the resonator coil. Field strength has increased by 3,000 percent.</div> I have reset the sensors to scan for frequencies outside the usual range. By emitting harmonic vibrations to shatter the lattices. We will monitor and adjust the frequency of the resonators.You can use this technique in posts, pages, or text widgets wherever you like on your site.
-Alex G.
- The topic ‘Is it possible to change line spacing in Sketch theme?’ is closed to new replies.