Skip to content

Css Namespace

David Rettenbacher edited this page Dec 9, 2017 · 1 revision

@namespace Keyword

The @namespace keyword enables you to use style custom elements. Namespaces can then be used in selectors.

Syntax

Import Namespace

@namespace <custom-namespace-name> "<full-qualified-namespace>";

Usage In Selectors

<custom-namespace-name>|<control-name> {
   ...
}

Usage In Property-Names

<custom-namespace-name>|<control-name> {
    <custom-namespace-name>|<property-name>: <value>;
}

Example

@namespace custom "App.UI.XamarinForms.Controls, App.UI.XamarinForms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";

custom|MyLabel {
    TextColor: Black;
    custom|MyLabel.PlaceholderTextColor: #333;
}
Clone this wiki locally