Skip to content

jamilgeor/Crayon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crayon

CSS for Mobile Development

Introduction

An open source CSS implementation for Xamarin mobile development tools

Target Platforms

  • Monotouch

Disclaimer

This is still in very early development stage. Would love feedback, contributions etc.

Sample

CSS

* {
	font-size: 18px;
	font-family: GillSans;
}

#sample-button { 
	height: 55px;
	width: 200px;
	opacity: 0.5;
	top: 50px;
	left: 75px;
	color: #FFFFFF;
	border-radius: 4px;
	border-width: 2px;
	border-color: #000000;
	background-color: #FF0000;
}

.sample-background {
	background-image: url('background.jpg');
	border-color: #DDDDDD;
	border-width: 5px;
}

C#

using Crayon;
using Crayon.MT;

...

var styleContext = new StyleContext (new IOSDeviceContext ());
styleContext.LoadStyleSheet ("style.css");

var button = UIButton.FromType (UIButtonType.Custom);
button.SetStyleId ("sample-button");

var background = new UIView();
background.SetStyleClass ("sample-background");

background.AddSubview(button);

Output

image

Documentation

IOS Documentation

Credits

  • This project makes extensive use of ExCSS

Contact

Twitter - @jamilgeor Website - https://jamilgeor.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published