Docs index
Getting started (6)- Introducing Microthemer 7
- Install and setup
- Basic workflow
- Who is Microthemer for?
- Troubleshooting
- V6 to V7 (main changes)
The interface (18)- Dark mode and layout options
- Selecting elements
- Styling options
- Draft vs published changes
- Folders
- Load CSS on specific pages
- Automatic page speed
- Responsive media queries
- Uninstall, but keep changes
- Preferences
- Site navigator
- History restore points
- HTML and CSS inspection
- Single selector vs full code editor
- Adding custom JavaScript
- Generated CSS
- Keyboard shortcuts
- Development roadmap
How To (10)- Create gradient text
- Blur the background, not the content
- Use Microthemer with Bricks Builder
- Apply CSS shapes and SVG masks
- Copy CodePen HTML/CSS/JS to WordPress
- Style WishList Member Registration Forms
- Use CSS pseudo elements (::before) for tooltips, Font Awesome icons, and speech bubbles
- Reuse styles with custom body classes
- WP container queries using Microthemer
- Gutenberg Responsive CSS using Microthemer
Old videos (11)- CSS grid controls
- Designing ‘broken grid’ layouts
- 3-2 alternating grid columns
- Mobile-first Gutenberg grids
- CSS variables
- Learn flexbox
- Google fonts
- Elementor integration
- Beaver Builder integration
- Oxygen Builder integration
- Fast & scalable Sass compilation
WP container queries using Microthemer
Container queries allow you to apply different styling depending on the size of a designated HTML element. They differ from media queries, which only allow you to apply different styling depending on the size of the browser viewport.
Setup Container Queries
If you hover over a container query tab, you will see the code for it, which uses @container instead of @media e.g.
Note: unlike with media queries, the site preview viewport does not change when switching between container query tabs, as they so not relate to the viewport.
Designate elements as containers
In order for your container query styles to take effect, you must actively designate an element as a container. This effectively tells the browser to watch for changes in its size, so it can apply new styling if necessary. Two new CSS properties have been added to the Behaviour property group to support this:
Note: it’s important to set the above properties on the All Devices tab, or in advanced cases on a media query tab, but not on a container query tab. Otherwise it simply won’t work.
container-type
Use container-type to specify what changes to look for. For instance, container-type: size checks for changes in height and width. Whereas container-type: inline-size only checks for width changes (or only height on occasions when the inline-axis is vertical).
container-name
Use container-name if you need to ensure that your container query only applies to a particular element with container-type set on it. For instance, if you set the following CSS properties on a header element:
You can then ensure that a container query only applies to the header element using:
Microthemer is a visual CSS Editor or WordPress. Try Microthemer now!