Skip to content

Mobile.BuildTools v1.2.1

Compare
Choose a tag to compare
@dansiegel dansiegel released this 28 Apr 17:39
· 736 commits to master since this release

The Mobile.BuildTools now ships with the LibSass compiler for .NET to support Xamarin.Forms CSS. Only SCSS stylesheets are supported and not the older SASS format.

CSS Notes

Xamarin.Forms CSS spec introduces an invalid syntax to support styling derived types. This Xamarin.Forms specific syntax is not supported by LibSass and as such it cannot be compiled by the Mobile.BuildTools. In order to support styling derived types, the Mobile.BuildTools introduces support for the use of either the any or all selector. Since these selectors are valid CSS/SCSS syntax LibSass is able to compile this to CSS. The Mobile.BuildTools then post processes the generated CSS to convert this to the Xamarin.Forms spec.

Xamarin Forms CSS Spec

^button {
  background-color: transparent;
}

Mobile.BuildTools SCSS Spec

button:any {
  background-color: transparent;
}