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]
- Enqueue a stylesheet for login page and make it appear in head element
- WP 3.4 – what action/hook is called when theme customisation is saved?
- Understanding wp_add_inline_style
- Is it good to rename theme folder downloaded from WordPress.org?
- Is the theme customizer slowing down my site?
- How can I get wp_head() as a string instead of echoing it?
- What does “Do not deregister the jquery script in the administration area” mean?
- What is the best book to learn how to make themes for wordpress?
- How do I make my wordpress page more friendly for mobile viewers?
- Example of a theme organization without all the default wp files in root
- Convert a static website to a WordPress theme and import all existing content
- Disable the Custom Internal CSS added by theme.json for Certain Pages
- Unwanted blank lines before tag
- Root Sage theme styles are not working!
- Custom Nav Walker Displaying Values in Sub Menu
- How to configure wordpress to work with Vuejs with SSR and without hashbang
- Some doubts about how to show posts in a custom theme?
- Can’t delete theme
- How to add a second stylesheet to the editor
- How to add an RSS logo to my blogs header?
- Single Page theme [closed]
- Can I have two different theme for two different language?
- WP_Comment_Query – Get comments and answers separately
- excerpt() shows different result between remote and localhost(development environment)
- Prefix best practice, should we use framework name or theme name?
- Theme Javascript.php Overwritten Nightly [closed]
- Displaying icon image for WordPress post formats, is there a cleaner way to do this?
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Is it possible to include an HTML flat-file website inside a WordPress theme?
- Overrite parent functions using child functions
- How can I change the theme of different posts using a plugin?
- Broken theme, template is missing
- WordPress page/blog incorporated into static website
- How to add menù section to my WordPress template?
- What are the critical theme files when building a custom theme?
- Theme Development -> Specific Homepage
- theme-independent CSS/JS files
- How add built-in textarea in theme development?
- Customize Option Framework
- Filter didn’t work on content class (hybrid_post_attributes)
- Trying to link to a php template file but its blank
- Theme author.php transfer
- user update profile for custom code
- WordPress uploads do not show up and I see the white screen of death in some cases
- How to fix an issue with customizer live preview?
- Any way to permanently translate themes?
- Custom CSS no getting applied
- Theme Development : License help
- Displaying Tags for the Page I’m On?
- How to make navigation a list without a plugin? [duplicate]
- Font Awesome Icons as squares [closed]