proportional old style figures. (typography)
-
wrote on Jun 24, 2021, 11:09 AM last edited by
-
Global Moderatorwrote on Jun 27, 2021, 2:02 AM last edited by Richard Jun 26, 2021, 10:02 PM
Dear @fernandol97
It should be possible, It may require you to use the open-type font format. .otf loaded into "text Formats"
https://www.quackit.com/css/css3/properties/css_font-variant-numeric.cfm
https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
Best wishes 🌝
Richard -
Dear @fernandol97
It should be possible, It may require you to use the open-type font format. .otf loaded into "text Formats"
https://www.quackit.com/css/css3/properties/css_font-variant-numeric.cfm
https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
Best wishes 🌝
Richardwrote on Oct 29, 2021, 5:48 PM last edited by@Richard Thanks for getting back to me! could you share any guidance on how i activate that style of numbers on the phone number here for example? i am pretty new to the code side of things. thanks! https://www.ianadam-smith.co.uk/infooffgreen/
-
Dear @fernandol97
If you wish to apply old-style numbering to your whole webpage then you can always add the following code into > Lay Options > Custom CSS & HTML > Custom CSS or via > Customize > CSS
body{ font-variant-numeric: oldstyle-nums; }
Sorry @fernandol97 i realise now coming back to this thread, that
font-variant-numeric
is built-in since css3 and does not require font-variant to be applied within CSS of typeface!https://www.quackit.com/css/css3/properties/css_font-variant-numeric.cfm
https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
Best wishes @fernandol97 & talk soon, let me know if you have trouble with the code and i can help 🌝
Richard
-
wrote on Feb 11, 2024, 12:41 PM last edited by
Hey Richard, Hope you are well. been a few years since I started this thread.
Starting up this thread again as I never figured this out. I am working with the same client and hoping to have certain lines of text set to Small Caps and numbers set to old style as seen here in my Figma design. im clueless when it comes to CCS was wondering if its possible to do via the type styles.
I should be going into the build phase in a few weeks time in lay theme and hoping I can figure it out. Thanks !
-
hey if you create a textformat, you will see it says :
html class: _MyFormat
Enter the custom css in "lay options" -> "custom css & html":
._MyFormat{ font-variant-numeric: oldstyle-nums; }
you could talk to the font creator / distributor and ask them what kind of css to use to have those styles
or as i said in my other post you may be able to get fonts that ONLY have these old numbers or old caps. then create textformats that use those fonts
-
hey if you create a textformat, you will see it says :
html class: _MyFormat
Enter the custom css in "lay options" -> "custom css & html":
._MyFormat{ font-variant-numeric: oldstyle-nums; }
you could talk to the font creator / distributor and ask them what kind of css to use to have those styles
or as i said in my other post you may be able to get fonts that ONLY have these old numbers or old caps. then create textformats that use those fonts
wrote on Feb 18, 2024, 5:04 PM last edited by@arminunruh Wow my first ever CSS accomplishment, thank you man!
I also code custom websites or custom Lay features.
💿 Email me here: 💿
info@laytheme.com
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it