Beamable SDK
All Classes Namespaces Functions Variables Properties Events
Public Member Functions | List of all members
Beamable.Tests.UI.Buss.StyleBehaviourTests.ComputeStyleObjectTests Class Reference
Inheritance diagram for Beamable.Tests.UI.Buss.StyleBehaviourTests.ComputeStyleObjectTests:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Tests.UI.Buss.StyleBehaviourTests.ComputeStyleObjectTests:
Collaboration graph
[legend]

Public Member Functions

void CombineBackgroundStyles ()
 (div #a) More...
 
void SelectorWeight ()
 (div #a) More...
 
void TargetedStylesAlwaysOutweighInherited ()
 (div #a) (text #b) More...
 
void InheritedStyles ()
 (div #a) (div #b) More...
 
- Public Member Functions inherited from Beamable.Tests.UI.Buss.BUSSTest
void RegisterTypes ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Beamable.Tests.UI.Buss.BUSSTest
static T CreateElement< T > (string id=null)
 
static void SetMockConfig (BussConfiguration config)
 
static void SetMockFallback (StyleSheetObject fallback)
 

Member Function Documentation

◆ CombineBackgroundStyles()

void Beamable.Tests.UI.Buss.StyleBehaviourTests.ComputeStyleObjectTests.CombineBackgroundStyles ( )
inline

(div #a)

#a { background-color: red; } div { color: green; }

Should result in the div::a element having the red background and green foreground. The style rules should combine to produce one style object.

◆ InheritedStyles()

void Beamable.Tests.UI.Buss.StyleBehaviourTests.ComputeStyleObjectTests.InheritedStyles ( )
inline

(div #a) (div #b)

#a { background-color: red; }

Should result in the div::b element having a red background color. The parent style should propagate to children.

◆ SelectorWeight()

void Beamable.Tests.UI.Buss.StyleBehaviourTests.ComputeStyleObjectTests.SelectorWeight ( )
inline

(div #a)

#a { background-color: red; } div { background-color: green; }

Should result in the div::a element having the red background. The #a selector is more specific, and should be used over the div selector.

◆ TargetedStylesAlwaysOutweighInherited()

void Beamable.Tests.UI.Buss.StyleBehaviourTests.ComputeStyleObjectTests.TargetedStylesAlwaysOutweighInherited ( )
inline

(div #a) (text #b)

img::a { color: red; background-color: red } text { color: green }

The child element should prefer the green color, because it comes from a direct match style. The inherited styles can apply, but should be secondary to targeted styles


The documentation for this class was generated from the following file: