S&box Wiki

Custom Style Properties

Custom Style Properties

We've added a few custom style properties to our implementation of css. Your editor might complain that these don't exist, but they do.

Here's what we added

Name Description / Notes
aspect-ratio float: Added by Facebook Flexbox. Element tries to keep its aspect ratio.
background-image-tint Color: multiplies the background image by this color
sound-in The name of a sound to play when this style is applied to an element for the first time. This is useful to put on a:hover style to play a sound when hovering.
sound-out The name of a sound to play when this style is removed from an element for the first time
pixel-snap If set to 1 we'll snap the UI to pixels. If your element is on screen, you probably want to snap to pixels. If it's something like an over-head name tag, something that follows the position of something in the world, you want to set this to 0. This property cascades automatically and defaults to 1.

Special Pages


Wikis

?

Render Time: 52ms

DB GetPage 42
Generate Html 0
SaveChanges (1) 7
Render Body 0
Render Sidebar 0