compass-holmes 0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ require 'compass'
2
+ extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
3
+ Compass::Frameworks.register('compass-holmes', :path => extension_path)
@@ -0,0 +1,3 @@
1
+ @import "compass-holmes/warn";
2
+ @import "compass-holmes/error";
3
+ @import "compass-holmes/deprecated";
@@ -0,0 +1,129 @@
1
+ /*
2
+ =========================================================================
3
+ = DEPRECATED & NON-W3C CONTENT ELEMENTS (#a9a9a9) =======================
4
+ = Based largely on http://www.w3.org/TR/html5/obsolete.html#obsolete ====
5
+ =========================================================================
6
+ */
7
+
8
+ /*************************************************************************
9
+ OUTLINES / BORDERS
10
+ *************************************************************************/
11
+ .holmes-debug {
12
+ applet,
13
+ acronym,
14
+ center,
15
+ dir,
16
+ font,
17
+ strike,
18
+ u,
19
+ big,
20
+ tt,
21
+ marquee,
22
+ plaintext,
23
+ xmp,
24
+
25
+ *[bordercolor],
26
+ *[bordercolordark],
27
+ *[bordercolorlight],
28
+ table[frame] {
29
+ border: 2px solid #a9a9a9;
30
+ }
31
+ }
32
+
33
+ body.holmes-debug {
34
+ &[bgproperties], &[topmargin], &[rightmargin], &[bottommargin], &[leftmargin] {
35
+ outline: 2px solid #a9a9a9;
36
+ }
37
+ }
38
+
39
+ /*************************************************************************
40
+ MESSAGE BOX STYLING
41
+ *************************************************************************/
42
+
43
+ .holmes-debug {
44
+ applet:hover::after,
45
+ acronym:hover::after,
46
+ center:hover::after,
47
+ dir:hover::after,
48
+ font:hover::after,
49
+ strike:hover::after,
50
+ big:hover::after,
51
+ tt:hover::after,
52
+ marquee:hover::after,
53
+ plaintext:hover::after,
54
+ xmp:hover::after,
55
+ *[bordercolor]:hover::after,
56
+ *[bordercolordark]:hover::after,
57
+ *[bordercolorlight]:hover::after,
58
+
59
+ table[frame]:hover::after {
60
+ border-radius: 0.5em;
61
+ display:block;
62
+ padding: 1em;
63
+ margin: 1em;
64
+ position: fixed;
65
+ color: #000;
66
+ font-size: 14px;
67
+ font-weight: normal;
68
+ font-family: 'Arial', sans-serif;
69
+ text-transform: none;
70
+ left: 0px;
71
+ top: 0px;
72
+ z-index: 9999;
73
+ text-decoration: none;
74
+ border: none;
75
+ background: #a9a9a9;
76
+ }
77
+ }
78
+
79
+ body.holmes-debug {
80
+ &[bgproperties]:hover::after,
81
+ &[topmargin]:hover::after,
82
+ &[rightmargin]:hover::after,
83
+ &[bottommargin]:hover::after,
84
+ &[leftmargin]:hover::after {
85
+ @extend .holmes_message_box;
86
+ top: auto;
87
+ left: auto;
88
+ bottom: 0px;
89
+ right: 0px;
90
+ /* Bottom right due to whole body coverage */
91
+ }
92
+ }
93
+
94
+ /*************************************************************************
95
+ MESSAGES CONTENT
96
+ *************************************************************************/
97
+
98
+ .holmes-debug {
99
+ applet:hover::after,
100
+ acronym:hover::after,
101
+ center:hover::after,
102
+ dir:hover::after,
103
+ font:hover::after,
104
+ strike:hover::after,
105
+ big:hover::after,
106
+ tt:hover::after,
107
+ marquee:hover::after,
108
+ plaintext:hover::after,
109
+ xmp:hover::after {
110
+ content:'Deprecated or Non-W3C element';
111
+ }
112
+
113
+ *[bordercolor]:hover::after,
114
+ *[bordercolordark]:hover::after,
115
+ *[bordercolorlight]:hover::after,
116
+ table[frame]:hover::after {
117
+ content:'Deprecated or Non-W3C body attribute bordercolor';
118
+ }
119
+ }
120
+
121
+ body.holmes-debug {
122
+ &[bgproperties]:hover::after {
123
+ content:'Deprecated or Non-W3C body attribute bgproperties';
124
+ }
125
+
126
+ &[topmargin]:hover::after, &[rightmargin]:hover::after, &[bottommargin]:hover::after, &[leftmargin]:hover::after {
127
+ content:'Deprecated or Non-W3C body attribute *margin';
128
+ }
129
+ }
@@ -0,0 +1,138 @@
1
+ /*
2
+ ======================================================
3
+ = ERROR LEVEL ========================================
4
+ ======================================================
5
+ */
6
+
7
+ /*************************************************************************
8
+ OUTLINES / BORDERS
9
+ *************************************************************************/
10
+
11
+ .holmes-debug {
12
+ a[href=""],
13
+ a:not([href]),
14
+
15
+ img:not([alt]),
16
+ img[alt=""],
17
+
18
+ label[for=""],
19
+ label:not([for]),
20
+
21
+ input:not([name]),
22
+ input[name=""],
23
+
24
+ select:not([name]),
25
+ select[name=""],
26
+
27
+ textarea:not([name]),
28
+ textarea[name=""],
29
+
30
+ abbr:not([title]),
31
+ abbr[title=""],
32
+
33
+ [class=""],
34
+ [id=""],
35
+
36
+ table:not([summary]),
37
+ table[summary=""] {
38
+ outline: 2px solid red;
39
+ }
40
+ }
41
+
42
+ /*************************************************************************
43
+ MESSAGE BOX STYLING
44
+ *************************************************************************/
45
+
46
+ .holmes-debug {
47
+ a[href=""]:hover::after,
48
+ a:not([href]):hover::after,
49
+
50
+ img:not([alt]):hover:after,
51
+ img[alt=""]:hover::after,
52
+
53
+ label:not([for]):hover::after,
54
+ label[for=""]:hover::after,
55
+
56
+ input:not([name]):hover::after,
57
+ input[name=""]:hover::after,
58
+
59
+ select:not([name]):hover::after,
60
+ select[name=""]:hover::after,
61
+
62
+ textarea:not([name]):hover::after,
63
+ textarea[name=""]:hover::after,
64
+
65
+ abbr:not([title]):hover::after,
66
+ abbr[title=""]:hover::after,
67
+
68
+ [class=""]:hover::after,
69
+ [id=""]:hover::after,
70
+
71
+ table:not([summary]):hover::after,
72
+ table[summary=""]:hover::after {
73
+ border-radius: 0.5em;
74
+ display:block;
75
+ padding: 1em;
76
+ margin: 1em;
77
+ position: fixed;
78
+ color: #000;
79
+ font-size: 14px;
80
+ font-weight: normal;
81
+ font-family: 'Arial', sans-serif;
82
+ text-transform: none;
83
+ left: 0px;
84
+ top: 0px;
85
+ z-index: 9999;
86
+ text-decoration: none;
87
+ border: none;
88
+ background: red;
89
+ }
90
+ }
91
+
92
+ /*************************************************************************
93
+ MESSAGES CONTENT
94
+ *************************************************************************/
95
+
96
+ .holmes-debug {
97
+ a[href=""]:hover::after,
98
+ a:not([href]):hover::after {
99
+ content:'Missing href attribute';
100
+ }
101
+
102
+ img[alt=""]:hover::after,
103
+ img:not([alt]):hover::after {
104
+ content:'Missing alt attribute';
105
+ }
106
+
107
+ label[for=""]:hover::after,
108
+ label:not([for]):hover::after {
109
+ content:'Missing for attribute';
110
+ }
111
+
112
+ input[name=""]:hover::after,
113
+ input:not([name]):hover::after,
114
+ select[name=""]:hover::after,
115
+ select:not([name]):hover::after,
116
+ textarea[name=""]:hover::after,
117
+ textarea:not([name]):hover::after {
118
+ content:'Missing name attribute';
119
+ }
120
+
121
+ abbr[title=""]:hover::after,
122
+ abbr:not([title]):hover::after {
123
+ content:'Missing title attribute';
124
+ }
125
+
126
+ [class=""]:hover::after {
127
+ content:'Blank class attribute';
128
+ }
129
+
130
+ [id=""]:hover::after {
131
+ content:'Blank id attribute';
132
+ }
133
+
134
+ table[summary=""]:hover::after,
135
+ table:not([summary]):hover::after {
136
+ content:'Missing summary attribute';
137
+ }
138
+ }
@@ -0,0 +1,106 @@
1
+ /*
2
+ ======================================================
3
+ = WARNING LEVEL ======================================
4
+ ======================================================
5
+ */
6
+
7
+ /*************************************************************************
8
+ OUTLINES / BORDERS
9
+ *************************************************************************/
10
+
11
+ .holmes-debug {
12
+ a[href="#"],
13
+ a[href^="javascript"],
14
+ a:not([title]),
15
+ a[title=""],
16
+ [style] {
17
+ outline: 2px solid #fd0;
18
+ }
19
+
20
+ div, span, li, p, td, th {
21
+ &:empty {
22
+ border: 2px solid #fd0;
23
+ }
24
+ }
25
+ }
26
+
27
+ /*************************************************************************
28
+ MESSAGE BOX STYLING
29
+ *************************************************************************/
30
+
31
+ .holmes-debug {
32
+ a[href="#"]:hover::after,
33
+ a[href^="javascript"]:hover::after,
34
+ a:not([title]):hover::after,
35
+ a[title=""]:hover::after,
36
+
37
+ div:empty:hover::after,
38
+ span:empty:hover::after,
39
+ li:empty:hover::after,
40
+ p:empty:hover::after,
41
+ td:empty:hover::after,
42
+ th:empty:hover::after,
43
+
44
+ [style]:hover::after {
45
+ border-radius: 0.5em;
46
+ display:block;
47
+ padding: 1em;
48
+ margin: 1em;
49
+ position: fixed;
50
+ color: #000;
51
+ font-size: 14px;
52
+ font-weight: normal;
53
+ font-family: 'Arial', sans-serif;
54
+ text-transform: none;
55
+ left: 0px;
56
+ top: 0px;
57
+ z-index: 9999;
58
+ text-decoration: none;
59
+ border: none;
60
+ background: #fd0;
61
+ }
62
+ }
63
+
64
+ /*
65
+ Fixes the case where a table may contain both errors and warnings - potentially other cases of this elsewhere
66
+ */
67
+
68
+ .holmes-debug {
69
+ td:empty:hover::after,
70
+ th:empty:hover::after {
71
+ top: 4em;
72
+ }
73
+ }
74
+
75
+ /*************************************************************************
76
+ MESSAGES CONTENT
77
+ *************************************************************************/
78
+
79
+ .holmes-debug {
80
+ a[title=""], a:not([title]) {
81
+ &:hover::after {
82
+ content:'Missing title attribute';
83
+ }
84
+ }
85
+
86
+ a[href="#"]:hover:after {
87
+ content:"href='#'";
88
+ }
89
+
90
+ a[href^="javascript"]:hover:after{
91
+ content:'Href has javascript';
92
+ }
93
+
94
+ [style]:hover::after {
95
+ content:'Element has inline styles';
96
+ }
97
+
98
+ div:empty:hover::after,
99
+ span:empty:hover::after,
100
+ li:empty:hover::after,
101
+ p:empty:hover::after,
102
+ td:empty:hover::after,
103
+ th:empty:hover::after {
104
+ content:'Empty element!';
105
+ }
106
+ }
@@ -0,0 +1,8 @@
1
+ // Highlights invalid markup
2
+ @import compass-holmes/error
3
+
4
+ // Highlights deprecated markup
5
+ @import compass-holmes/deprecated
6
+
7
+ // Highlights non-standards compliant markup
8
+ @import compass-holmes/warn
@@ -0,0 +1,23 @@
1
+ description "An implementation of the Holmes Markup Detective for use with Compass"
2
+
3
+ stylesheet 'screen.scss', :media => 'screen, projection'
4
+ stylesheet '_holmes.scss'
5
+
6
+ help %Q{
7
+ Docs can be found on the github page:
8
+
9
+ https://github.com/markdboyd/Compass-Holmes
10
+ }
11
+
12
+ welcome_message %Q{
13
+ Docs can be found on the github page:
14
+
15
+ https://github.com/markdboyd/Compass-Holmes
16
+
17
+ To get started, simply:
18
+
19
+ Include the styles from Compass Holmes that you want
20
+ Add a body class of "holmes-debug"
21
+
22
+ Enjoy! If you have any problems or suggestions, feel to report them to the github issue queue.
23
+ }
@@ -0,0 +1 @@
1
+ @import "holmes";
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: compass-holmes
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Mark Boyd
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-04-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: compass
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0.11'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0.11'
30
+ description: An implementation of the Holmes Markup Detective for use with Compass
31
+ email: markdavidboyd@gmail.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/compass-holmes.rb
37
+ - stylesheets/compass-holmes/_warn.scss
38
+ - stylesheets/compass-holmes/_deprecated.scss
39
+ - stylesheets/compass-holmes/_error.scss
40
+ - stylesheets/_compass-holmes.scss
41
+ - templates/project/manifest.rb
42
+ - templates/project/screen.scss
43
+ - templates/project/_holmes.scss
44
+ homepage:
45
+ licenses: []
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 1.8.21
65
+ signing_key:
66
+ specification_version: 3
67
+ summary: An implementation of the Holmes Markup Detective for use with Compass
68
+ test_files: []