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

Side by Side Diff: third_party/pyscss/scss/tests/test_mixin.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_if.py ('k') | third_party/pyscss/scss/tests/test_nesting.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_mixin(self):
12 src = """
13 @mixin font {
14 font: {
15 weight: inherit;
16 style: inherit;
17 size: 100%;
18 family: inherit; };
19 vertical-align: baseline; }
20
21 @mixin global {
22 .global {
23 border:red;
24 @include font;
25 }
26 }
27
28 @include global;
29
30 @mixin rounded-top( $radius:10px ) {
31 $side: top;
32 border-#{$side}-radius: $radius;
33 -moz-border-radius-#{$side}: $radius;
34 -webkit-border-#{$side}-radius: $radius;
35 }
36 #navbar li { @include rounded-top; }
37 #footer { @include rounded-top(5px); }
38 """
39 test = ".global{border:#f00;vertical-align:baseline;font-weight:inherit; font-style:inherit;font-size:100%;font-family:inherit}#navbar li{border-top-radi us:10px;-moz-border-radius-top:10px;-webkit-border-top-radius:10px}#footer{borde r-top-radius:5px;-moz-border-radius-top:5px;-webkit-border-top-radius:5px}"
40 out = self.parser.loads(src)
41 self.assertEqual(test, out)
OLDNEW
« no previous file with comments | « third_party/pyscss/scss/tests/test_if.py ('k') | third_party/pyscss/scss/tests/test_nesting.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698