Skip to content

Styling a Micrio embed using CSS Client 5.x

This page is about the Micrio client version 5. Use the links below to navigate to alternative versions.

CSS variables

Micrio 5 uses a set of CSS variables for styling its HTML elements. This means that you can adjust these variables very easily to tweak the default Micrio look and feel:

VariableDefault valueDescription
--micrio-color#000The default text color
--micrio-color-hover#c5ff5bThe color for hovering clickable elements
--micrio-border-radius16pxThe border radius for buttons, popups, etc
--micrio-backgroundrgba(255,255,255,0.66)Element background color
--micrio-background-filterblur(8px)The modal / button background filter
--micrio-icon-size18pxThe default button icon size
--micrio-text-alignleftThe text alignment-- defaults to right on LTR languages
--micrio-line-height1.5emPopup article line height
--micrio-border-margin16pxThe margin elements will have from the browser border
--micrio-button-size64pxThe buttons size
--micrio-button-shadow0 4px 8px rgba(0,0,0,.33)The button shadow effect
--micrio-marker-size16pxThe base marker size
--micrio-marker-text-color#fffThe marker label text color
--micrio-marker-text-shadow0px 4px 8px rgba(0,0,0,0.33)The marker label text shadow
--micrio-marker-color#fffThe clickable marker color
--micrio-marker-border-radius100%The marker border radius (round)
--micrio-marker-border-colorrgba(255,255,255,0.2)The marker border color
--micrio-marker-border-size8pxThe marker border size
--micrio-marker-iconnoneA customizable CSS marker icon url() property
--micrio-marker-transitionbackground-color 0.5s ease, opacity 0.25s easeThe marker transition properties
--micrio-popup-backgroundvar(--micrio-background)The marker popup background
--micrio-popup-shadow0 8px 16px rgba(0,0,0,.33)The marker popup box shadow
--micrio-popup-padding16pxThe marker popup inner padding
--micrio-progress-bar-backgroundrgba(255,255,255,0.25Media player time track background
--micrio-progress-bar-height4pxMedia player time track height
--micrio-waypoint-size120pxVirtual tour waypoint icon size

Mobile responsiveness

There is also a light-weight responsive mode which affects the CSS variables. For screens narrower than 500px, this is the CSS:

css
@media (max-width: 500px) {
	html {
		--micrio-border-margin: 5px;
		--micrio-button-size: 48px;
	}
}

Dark mode and light mode

By default, Micrio 5.0 and up support light and dark modes. It defaults to dark mode.

If you want to use the browser's color scheme auto detection, add the class micrio-auto-scheme to the <micr-io> element, or to force light mode, add the micrio-light-mode class.

Light mode is the following CSS:

css
micr-io {
	--micrio-color: #000;
	--micrio-background: rgba(255,255,255,0.66);
	--micrio-popup-background: var(--micrio-background);
	--micrio-background-hover: var(--micrio-background);
	--micrio-progress-bar-background: rgba(0,0,0,.25);
}

Custom CSS overwrites

Of course, since <micr-io> is a simple HTML element, you can use your own CSS to overwrite any of Micrio's styling.

All of Micrio's HTML elements have a micrio- classname prefix, so it's easy to target specific elements.