You can use em sizing to make the dashicons scale relative to the font size of their containing element. This should do the trick:
.dashicons:before {
width: 1em;
height: 1em;
font-size: 1em;
}
Then if your <h1>
element has a font-size of 48px
, your dashicon will as well.
Related Posts:
- Where is definied the theme location for the main menu in a WordPress template?
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- Some doubts about WordPress handle the horizontal main menu visualization
- Why the slideshow is not shown in my theme?
- How to add CSS class to custom logo?
- How to add custom css file in theme?
- Do I actually need to link my theme’s style.css in the theme files
- CSS classes for theme
- Are the WordPress Core CSS styles really all nessesary?
- Why doesn’t default WordPress page view use force_balance_tags?
- Hide a div that is part of all pages on one specific page
- Why I can’t add a CSS style in this WordPress theme?
- Can’t get staging site to display same way as live site. Completely stumped
- How to make a theme with more than one CSS file?
- Editing the custom background CSS
- CSS in child theme not overriding the parent theme [closed]
- How to highlight the current page in the nav menu?
- Sub folder CSS that’s read by Admin panel
- Dequeue a style file which is making website load slow!
- Theme Loading Into Dashboard
- How to edit my theme for full width?
- Which html elements should be styled in wordpress theme
- Font Awesome 5 Free – far working but fas is not? [closed]
- WordPress Unite Theme: Footer isn’t sticking [closed]
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Random white space before doctype
- Having issue with WordPress wp_enqueue_style
- How can I wrap all blog posts image with
- theme style is applied on the dhasboard rather than the website
- LESS not working in WordPress [closed]
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- multiple html/css files for wordpress theme?
- How to create a WP theme that use BootStrap? [closed]
- Can’t change theme name
- my single.php is mixup on some post for no reason
- How to use the _S framework
- Is there a list of default generated Gutenberg block CSS? Unable to align video blocks
- Why nav_menu_css_class doesn’t work with apply_filters?
- How do I change the color of individual page titles in WordPress?
- How can I fix my theme header for my CSS stylesheet?
- How to generate a rtl.css file for themes?
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- adding navigation to genesis themes
- Standard Way To Do Custom Work Within A Page?
- Custom link color or stylesheets
- How can I get rid of the distance when I’m using list-style-type: none? [closed]
- What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
- HTML to WORDPRESS [closed]
- Dynamic nav menu with icons [closed]
- How to define and link full path to css located at a random folder on header.php
- Sizing screenshot.png without losing aspect ratio
- How important is it to enqueue a theme’s stylesheet?
- CSS not updating in browser when I change it
- theme path in javascript file
- get_template_part vs action hooks in themes
- Solutions for generating dynamic javascript / CSS
- The the_post_thumbnail without srcset?
- The proper way to include/require PHP files in WordPress
- after_setup_theme always runs
- Why do some sites show themes/”themename” as the only theme?
- Which function(s) to build a paged HTML table
- Is there any open source WordPress Themes?
- How do I add new layout width options in WordPress editor?
- Correct way to make a custom block theme responsive
- Is there a way to prevent wp_head from outputting self-closing tags?
- .submenu class missing in output from wp_nav_menu
- How to make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?
- Is there a way to have WordPress autodetect page templates in the page-templates directory and any sub-folders?
- What is the point of using the front-page.php template? [closed]
- My wordpress site memory exhausted more than 1GB trying to debug with default
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?
- How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?
- How to create A – Z List with pictures?
- Full site editing templates folder vs block-templates
- How do I send out an update for my custom wordpress theme?
- TItle In Latest Post is not using H1 Tag [closed]
- Is via.placeholder.com a good site to auto-generate placeholder images?
- Should we escape the values of constants?
- Align images to the left of the content
- Image and font support missing in editor when deploying theme remotely
- WordPress search field won’t get wider
- Font Awesome Icons as squares [closed]
- Is child-theme required when modyfing “Appearence > Editor”?
- How to Add Dynamic Sliders to WordPress Customizer with JavaScript
- How to add multiple custom blocks in custom WordPress theme using create-block?
- Export WordPress theme with modifications for other site
- WP Update Messages get cut off during Theme update
- Trying to create a cutom query with pagination and page 2 breaking. Any help?
- WordPress 6.4.2 – can’t load editor style css using ‘after_setup_theme’ or ‘admin_init’ actions
- Why is wp_nav_menu() not removing the container around the nav ?
- Confusion about theme’s parent and child functions.php file
- Theme folder name changed after update theme
- editor.css and block-editor.js are not applied even though they are in the theme setup
- Twenty Twenty-Four Theme, where to put the personalized CSS style rules?
- Modify HTMl on header.php on Block Theme like Twenty Twenty Three?
- How to add custom attributes to wordpress block theme
- Full Site Editing, Block Theme, Gutenberg, Site Editor
- how to combine wordpress and front framework
- .htaccess for file .zip for update WordPress Theme self-host [closed]