From 8627c31462597b11878bb77494ad3a0e54e2aa61 Mon Sep 17 00:00:00 2001 From: Meir Blachman Date: Fri, 6 Nov 2020 12:01:47 +0200 Subject: [PATCH] prettify code snippter in readme --- readme.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/readme.md b/readme.md index 639b84f0..b8cbcb55 100644 --- a/readme.md +++ b/readme.md @@ -16,14 +16,14 @@ character as individual tokens run against a complex set of rules that define wh Once parsed, the input styles sheet is turned into a standard .NET object model. That means it's fully queryable using Linq to objects. ## A basic example: -``` - var parser = new StylesheetParser(); - var stylesheet = parser.Parse(".someClass{color: red; background-image: url('/images/logo.png')"); - - var rule = stylesheet.Rules.First() - var selector = rule.SelectorText; // Yields .someClass - var color = rule.Style.Color; - var image = rule.Style.BackgroundImage; // url('/images/logo.png') +```cs +var parser = new StylesheetParser(); +var stylesheet = parser.Parse(".someClass{color: red; background-image: url('/images/logo.png')"); + +var rule = stylesheet.Rules.First() +var selector = rule.SelectorText; // Yields .someClass +var color = rule.Style.Color; +var image = rule.Style.BackgroundImage; // url('/images/logo.png') ``` ## CSS 3 Compatible