Difference between revisions of "Filter (CSS property)"

From PowerUI
Jump to: navigation, search
 
Line 8: Line 8:
  
 
[[File:Filtering.png]]
 
[[File:Filtering.png]]
 +
 +
''Above: Sepia, blur and invert applied to an img element.''
  
 
{| class="wikitable"
 
{| class="wikitable"

Latest revision as of 21:37, 30 March 2017

PowerUI contains an experimental filter CSS property under the -spark prefix (-spark-filter):

-spark-filter: <filter-function> [<filter-function>]* | none | flatten

Filtering.png

Above: Sepia, blur and invert applied to an img element.

Inherited? Initial value
No none

For example:

<img src='hello.png' style='-spark-filter: sepia(60%)'>

This works by 'flattening' your elements - that's where it renders them to a RenderTexture - then the Loonim engine is applied based on the functions you provide.