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]
- Generating CSS Files Dynamically Using PHP Scripts?
- WP 3.4 – what action/hook is called when theme customisation is saved?
- What, specifically, should be included in theme_name_setup()?
- How to get gallery images?
- Is the theme customizer slowing down my site?
- 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?
- Symlink a directory to wp-content/themes
- How do I make my wordpress page more friendly for mobile viewers?
- What are WooCommerce starter themes? [closed]
- Is there an error in get_the_tag_list()?
- Convert a static website to a WordPress theme and import all existing content
- How do you protect a premium theme from being copied?
- Do I need normalize.css when developing my own WordPress-theme?
- How to float an image in Gutenberg
- Can’t delete theme
- Prefix best practice, should we use framework name or theme name?
- Theme Javascript.php Overwritten Nightly [closed]
- How to add Space between sidebar and footer widget in WordPress theme [closed]
- Call to undefined function add_menu_page() on theme activation
- Using page-id-{ID} from body_class() in local dev, versus live staging
- Is it acceptable for a WordPress theme to not accept widgets?
- Should all references to a text domain be to my current theme?
- Custom image size vs CSS sizing
- Theme Customizer not displaying saved values in wp_head (CSS)
- Thesis -style Navigation
- White screen when attaching css to function.php
- Create theme for mobile phones and tablets only?
- Theme Checker Text Domain
- How to copy page/post from one theme to another?
- Not sure how to debug this npm install error. This is a wordpress theme that comes with a built-in gulp/webpack task automation [closed]
- Why front-page.php doesn’t show content of file instead shows loop
- Find the source file causing a Mixed Content warning
- How can I not disable my theme when I want to upload a new version of it?
- jQuery for Fade Preload Causes My Site Favicon to Disappear from Tab of Browser
- Are paginated comments required for publishing Themes?
- Avoiding do_shortcode() loops
- How to add Open/Close Toggle button into Twenty Fifteen theme for hiding left sidebar?
- Correct was to customise theme using get_theme_mod in scripts
- Custom theme vs theme customization?
- how can I re-utilize and class on a child theme
- How to figure out which wordpress theme a site was using?
- Flexslider not working for my custom theme WordPress
- “No Data Received” error in Chrome every time i try to update the theme functions file
- Redirect to custom login page
- How to close open divs in post loop
- Display Today’s date outside the loop?
- Turning WordPress Into full-featured website?
- How to add or remove borders in navigation menu?
- Detect custom font size
- Full site editing templates folder vs block-templates