From b6feca3324b400e7abf870515ec8213715187c71 Mon Sep 17 00:00:00 2001 From: Haijian Wang Date: Tue, 26 Feb 2013 13:32:28 +0200 Subject: Fixed several problems related to @extend directive (Ticket #10976) Change-Id: I5e409856601aa514965319453c11946028b08dda --- .../automatic/scss/extend-in-nested-block.scss | 11 +++++++++ .../scss/extend-selector-in-different-levels.scss | 26 ++++++++++++++++++++++ ...ing-non-exist-selector-with-same-beginning.scss | 8 +++++++ .../automatic/scss/extending-same-selector.scss | 8 +++++++ .../extending-selector-with-same-beginning.scss | 8 +++++++ 5 files changed, 61 insertions(+) create mode 100644 theme-compiler/tests/resources/automatic/scss/extend-in-nested-block.scss create mode 100644 theme-compiler/tests/resources/automatic/scss/extend-selector-in-different-levels.scss create mode 100644 theme-compiler/tests/resources/automatic/scss/extending-non-exist-selector-with-same-beginning.scss create mode 100644 theme-compiler/tests/resources/automatic/scss/extending-same-selector.scss create mode 100644 theme-compiler/tests/resources/automatic/scss/extending-selector-with-same-beginning.scss (limited to 'theme-compiler/tests/resources/automatic/scss') diff --git a/theme-compiler/tests/resources/automatic/scss/extend-in-nested-block.scss b/theme-compiler/tests/resources/automatic/scss/extend-in-nested-block.scss new file mode 100644 index 0000000000..d62ead937e --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/extend-in-nested-block.scss @@ -0,0 +1,11 @@ +.test{ + .error { + border: 1px #f00; + background-color: #fdd; + } + + .seriousError { + @extend .error; + border-width: 3px; + } +} \ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/extend-selector-in-different-levels.scss b/theme-compiler/tests/resources/automatic/scss/extend-selector-in-different-levels.scss new file mode 100644 index 0000000000..977ead8d62 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/extend-selector-in-different-levels.scss @@ -0,0 +1,26 @@ +.test{ + .middle{ + .error { + border: 1px #f00; + background-color: #fdd; + } + } + + .seriousError { + @extend .error; + border-width: 3px; + } +} + +.test1{ + .error1 { + border: 1px #f00; + background-color: #fdd; + } + .middle1{ + .seriousError1 { + @extend .error1; + border-width: 3px; + } + } +} \ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/extending-non-exist-selector-with-same-beginning.scss b/theme-compiler/tests/resources/automatic/scss/extending-non-exist-selector-with-same-beginning.scss new file mode 100644 index 0000000000..538f17da1d --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/extending-non-exist-selector-with-same-beginning.scss @@ -0,0 +1,8 @@ +.test1 { + color: blue; +} + +.test2 { + @extend .test; + background: red; +} \ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/extending-same-selector.scss b/theme-compiler/tests/resources/automatic/scss/extending-same-selector.scss new file mode 100644 index 0000000000..fbfaed9b20 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/extending-same-selector.scss @@ -0,0 +1,8 @@ +.test { + color: blue; +} + +.test { + @extend .test; + background: red; +} \ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/extending-selector-with-same-beginning.scss b/theme-compiler/tests/resources/automatic/scss/extending-selector-with-same-beginning.scss new file mode 100644 index 0000000000..c7a9e5e921 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/extending-selector-with-same-beginning.scss @@ -0,0 +1,8 @@ +.test1 { + color: blue; +} + +.test2 { + @extend .test1; + background: red; +} \ No newline at end of file -- cgit v1.2.3