Skip to content

"Relativizes" sizes defined in the stylesheets that are automatically applied by Markdeep.

License

Notifications You must be signed in to change notification settings

doersino/markdeep-relative-sizes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdeep-relative-sizes

The stylesheet relativize.css, which is provided for different Markdeep versions, "relativizes" sizes: It overrides sizes/lengths defined in terms of px, pt etc. in the stylesheets that are automatically applied by Markdeep with lenghts defined in terms of rem. This enables scaling the entire document simply by adjusting the <html> element's font size – exactly what's required to enable

The conversion rule is simple: ⟨N⟩pxcalc(⟨N⟩rem / var(--rf)), where --rf is the base font size the original px measurements are assumed to be relative to. In fact, --rf is the browser default, 16px. (Note that I would've preferred to define --rf: calc(1rem / 16px) and then use it like calc(⟨N⟩px * var(--rf)), but calc disappointingly, yet understandably, can't deal with "rem per pixel" units in current browsers.)

When applied to a standard Markdeep document (i.e. loaded before Markdeep), this stylesheet is designed not to yield any visual changes (unless you change the root font size from its 16px default, that is).

About

"Relativizes" sizes defined in the stylesheets that are automatically applied by Markdeep.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages