开发者 | mpol |
---|---|
更新时间 | 2024年10月8日 01:45 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.6 |
版权: | GPLv2 |
zeno-font-resizer
to the /wp-content/plugins/
directory or install the plugin directly with the 'Install' function in the 'Plugins' menu in WordPress.Go to the admin page of the plugin and select your option. If you are not familiar with html and css, select the html option (default). This would resize all the content of your site.
The plugin expects the CSS of your theme to be set up in a flexible way. When you have a static font-size like 14px or 14pt for your menu or content elements, this will not be affected by the plugin. This way of using font-size is maybe pixel-perfect for the designer, but not accessible for the user, so you should only use it for design elements, like a text overlay for an image. When you use a percentage, like 100% or 124%, it is dynamic and will follow (inherit) the font-size of the parent (and so up). The same dynamic counts for setting in em.
The font-size in rem is relative to the font-size of the root element. So you can go to the Settingspage of this plugin, and set the html element as the element to change the font-size of (default since 1.4.4). Now your rem elements should follow the resizing.
Use this snippet of PHP code (in your theme or somewhere):
You can use the parameter '$echo = false' and the function will return the html-string:
With CSS in your theme. Use something like: p.zeno_font_resizer > a { color: blue; }
Your theme is missing some necessary CSS for '.screen-reader-text'. Please contact the maker of your theme. More information can be found in the Handbook about Accessibility.
There is an additional plugin on Codeberg you can use for that.