Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: third_party/pyscss/scss/tests/test_variables.py

Issue 9111023: Pyscss is obsolete with Dart CSS complier; remove all pyscss code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove pyparsing from .gitignore Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/pyscss/scss/tests/test_scss.py ('k') | third_party/pyscss/scss/tool.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 import unittest
2
3 from scss.parser import Stylesheet
4
5
6 class TestSCSS( unittest.TestCase ):
7
8 def setUp(self):
9 self.parser = Stylesheet(options=dict(compress=True))
10
11 def test_variables(self):
12 src = """
13 @vars {
14 $blue: #ffdd00 !default;
15 $test: rgb(120, 35, 64);
16 $test2: rgba(120, 35, 64, .4);
17 $property: float;
18 $value: left;
19 $len: 0px or 5px;
20 }
21 $margin: 16px;
22 $side: top;
23 $image: 'test.png';
24
25 .content-navigation {
26 #{$property}: #{$value};
27 border-color: $blue;
28 background-color: $test + 5%;
29
30
31 background-image: url('/test/' + $image);
32 display: -moz-inline-box;
33 color: $blue - 9%;
34 margin: $len (-$margin * 2 ) -12px;
35 }
36
37 .border {
38 padding-#{$side}: $margin / 2;
39 margin: $margin / 2;
40 padding-left: -$margin + 2px;
41 border-#{$side}: {
42 color: $blue;
43 }
44 color: $test2;
45 font: -1.5em + 50px;
46 }
47 """
48 test = ".content-navigation{float:left;display:-moz-inline-box;margin:5p x -32px -12px;border-color:#fd0;background-color:#7b1f3e;background-image:url(/t est/test.png);color:#f3d40b}.border{margin:8px;padding-top:8px;padding-left:-14p x;border-top-color:#fd0;color:rgba(120,35,64,0.40);font:30.5px}"
49 out = self.parser.loads(src)
50 self.assertEqual(test, out)
OLDNEW
« no previous file with comments | « third_party/pyscss/scss/tests/test_scss.py ('k') | third_party/pyscss/scss/tool.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698