| 1 | package App::ZofCMS::Plugin::LinksToSpecs::CSS; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | our $VERSION = '1.001010'; # VERSION | |||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub new { bless {}, shift } | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 9 | |||||||||||
| 10 | 0 | ▶ | sub process { | ||||||||
|
Subroutine
process: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 11 | 0 | my ( $self, $template ) = @_; | |||||||||
| 12 | |||||||||||
| 13 | 0 | my %pseudo_classes = ( | |||||||||
| 14 | ':focus' | ||||||||||
| 15 | => q|http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes|, | ||||||||||
| 16 | ':hover' | ||||||||||
| 17 | => q|http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes|, | ||||||||||
| 18 | ':visited' | ||||||||||
| 19 | => q|http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes|, | ||||||||||
| 20 | ':active' | ||||||||||
| 21 | => q|http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes|, | ||||||||||
| 22 | ':link' | ||||||||||
| 23 | => q|http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes|, | ||||||||||
| 24 | ':lang' | ||||||||||
| 25 | => q|http://www.w3.org/TR/CSS21/selector.html#lang|, | ||||||||||
| 26 | ':first-child' | ||||||||||
| 27 | => q|http://www.w3.org/TR/CSS21/selector.html#first-child|, | ||||||||||
| 28 | ); | ||||||||||
| 29 | |||||||||||
| 30 | 0 | my %pseudo_elements = ( | |||||||||
| 31 | ':before' | ||||||||||
| 32 | => q|http://www.w3.org/TR/CSS21/selector.html#before-and-after|, | ||||||||||
| 33 | ':after' | ||||||||||
| 34 | => q|http://www.w3.org/TR/CSS21/selector.html#before-and-after|, | ||||||||||
| 35 | ':first-line' | ||||||||||
| 36 | => q|http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo|, | ||||||||||
| 37 | ':first-letter' | ||||||||||
| 38 | => q|http://www.w3.org/TR/CSS21/selector.html#first-letter|, | ||||||||||
| 39 | ); | ||||||||||
| 40 | |||||||||||
| 41 | 0 | my %props = ( | |||||||||
| 42 | 'background' | ||||||||||
| 43 | => q|http://w3.org/TR/CSS21/colors.html#propdef-background|, | ||||||||||
| 44 | |||||||||||
| 45 | 'border-left-color' | ||||||||||
| 46 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-left-color|, | ||||||||||
| 47 | |||||||||||
| 48 | 'border-left-style' | ||||||||||
| 49 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-left-style|, | ||||||||||
| 50 | |||||||||||
| 51 | 'border-spacing' | ||||||||||
| 52 | => q|http://w3.org/TR/CSS21/tables.html#propdef-border-spacing|, | ||||||||||
| 53 | |||||||||||
| 54 | 'list-style-image' | ||||||||||
| 55 | => q|http://w3.org/TR/CSS21/generate.html#propdef-list-style-image|, | ||||||||||
| 56 | |||||||||||
| 57 | 'content' | ||||||||||
| 58 | => q|http://w3.org/TR/CSS21/generate.html#propdef-content|, | ||||||||||
| 59 | |||||||||||
| 60 | 'vertical-align' | ||||||||||
| 61 | => q|http://w3.org/TR/CSS21/visudet.html#propdef-vertical-align|, | ||||||||||
| 62 | |||||||||||
| 63 | 'page-break-before' | ||||||||||
| 64 | => q|http://w3.org/TR/CSS21/page.html#propdef-page-break-before|, | ||||||||||
| 65 | |||||||||||
| 66 | 'font-size' | ||||||||||
| 67 | => q|http://w3.org/TR/CSS21/fonts.html#propdef-font-size|, | ||||||||||
| 68 | |||||||||||
| 69 | 'border-width' | ||||||||||
| 70 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-width|, | ||||||||||
| 71 | |||||||||||
| 72 | 'counter-increment' | ||||||||||
| 73 | => q|http://w3.org/TR/CSS21/generate.html#propdef-counter-increment|, | ||||||||||
| 74 | |||||||||||
| 75 | 'max-height' | ||||||||||
| 76 | => q|http://w3.org/TR/CSS21/visudet.html#propdef-max-height|, | ||||||||||
| 77 | |||||||||||
| 78 | 'outline-color' | ||||||||||
| 79 | => q|http://w3.org/TR/CSS21/ui.html#propdef-outline-color|, | ||||||||||
| 80 | |||||||||||
| 81 | 'background-color' | ||||||||||
| 82 | => q|http://w3.org/TR/CSS21/colors.html#propdef-background-color|, | ||||||||||
| 83 | |||||||||||
| 84 | 'padding-bottom' | ||||||||||
| 85 | => q|http://w3.org/TR/CSS21/box.html#propdef-padding-bottom|, | ||||||||||
| 86 | |||||||||||
| 87 | 'caption-side' | ||||||||||
| 88 | => q|http://w3.org/TR/CSS21/tables.html#propdef-caption-side|, | ||||||||||
| 89 | |||||||||||
| 90 | 'height' | ||||||||||
| 91 | => q|http://w3.org/TR/CSS21/visudet.html#propdef-height|, | ||||||||||
| 92 | |||||||||||
| 93 | 'border-top' | ||||||||||
| 94 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-top|, | ||||||||||
| 95 | |||||||||||
| 96 | 'background-attachment' | ||||||||||
| 97 | => q|http://w3.org/TR/CSS21/colors.html#propdef-background-attachment|, | ||||||||||
| 98 | |||||||||||
| 99 | 'font-variant' | ||||||||||
| 100 | => q|http://w3.org/TR/CSS21/fonts.html#propdef-font-variant|, | ||||||||||
| 101 | |||||||||||
| 102 | 'visibility' | ||||||||||
| 103 | => q|http://w3.org/TR/CSS21/visufx.html#propdef-visibility|, | ||||||||||
| 104 | |||||||||||
| 105 | 'quotes' | ||||||||||
| 106 | => q|http://w3.org/TR/CSS21/generate.html#propdef-quotes|, | ||||||||||
| 107 | |||||||||||
| 108 | 'border-collapse' | ||||||||||
| 109 | => q|http://w3.org/TR/CSS21/tables.html#propdef-border-collapse|, | ||||||||||
| 110 | |||||||||||
| 111 | 'letter-spacing' | ||||||||||
| 112 | => q|http://w3.org/TR/CSS21/text.html#propdef-letter-spacing|, | ||||||||||
| 113 | |||||||||||
| 114 | 'orphans' | ||||||||||
| 115 | => q|http://w3.org/TR/CSS21/page.html#propdef-orphans|, | ||||||||||
| 116 | |||||||||||
| 117 | 'margin-bottom' | ||||||||||
| 118 | => q|http://w3.org/TR/CSS21/box.html#propdef-margin-bottom|, | ||||||||||
| 119 | |||||||||||
| 120 | 'position' | ||||||||||
| 121 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-position|, | ||||||||||
| 122 | |||||||||||
| 123 | 'widows' | ||||||||||
| 124 | => q|http://w3.org/TR/CSS21/page.html#propdef-widows|, | ||||||||||
| 125 | |||||||||||
| 126 | 'border-left' | ||||||||||
| 127 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-left|, | ||||||||||
| 128 | |||||||||||
| 129 | 'margin-right' | ||||||||||
| 130 | => q|http://w3.org/TR/CSS21/box.html#propdef-margin-right|, | ||||||||||
| 131 | |||||||||||
| 132 | 'table-layout' | ||||||||||
| 133 | => q|http://w3.org/TR/CSS21/tables.html#propdef-table-layout|, | ||||||||||
| 134 | |||||||||||
| 135 | 'border-bottom-width' | ||||||||||
| 136 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-bottom-width|, | ||||||||||
| 137 | |||||||||||
| 138 | 'font-family' | ||||||||||
| 139 | => q|http://w3.org/TR/CSS21/fonts.html#propdef-font-family|, | ||||||||||
| 140 | |||||||||||
| 141 | 'border' | ||||||||||
| 142 | => q|http://w3.org/TR/CSS21/box.html#propdef-border|, | ||||||||||
| 143 | |||||||||||
| 144 | 'background-image' | ||||||||||
| 145 | => q|http://w3.org/TR/CSS21/colors.html#propdef-background-image|, | ||||||||||
| 146 | |||||||||||
| 147 | 'font' | ||||||||||
| 148 | => q|http://w3.org/TR/CSS21/fonts.html#propdef-font|, | ||||||||||
| 149 | |||||||||||
| 150 | 'border-bottom-style' | ||||||||||
| 151 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-bottom-style|, | ||||||||||
| 152 | |||||||||||
| 153 | 'bottom' | ||||||||||
| 154 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-bottom|, | ||||||||||
| 155 | |||||||||||
| 156 | 'border-style' | ||||||||||
| 157 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-style|, | ||||||||||
| 158 | |||||||||||
| 159 | 'counter-reset' | ||||||||||
| 160 | => q|http://w3.org/TR/CSS21/generate.html#propdef-counter-reset|, | ||||||||||
| 161 | |||||||||||
| 162 | 'empty-cells' | ||||||||||
| 163 | => q|http://w3.org/TR/CSS21/tables.html#propdef-empty-cells|, | ||||||||||
| 164 | |||||||||||
| 165 | 'border-left-width' | ||||||||||
| 166 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-left-width|, | ||||||||||
| 167 | |||||||||||
| 168 | 'border-top-color' | ||||||||||
| 169 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-top-color|, | ||||||||||
| 170 | |||||||||||
| 171 | 'white-space' | ||||||||||
| 172 | => q|http://w3.org/TR/CSS21/text.html#propdef-white-space|, | ||||||||||
| 173 | |||||||||||
| 174 | 'background-position' | ||||||||||
| 175 | => q|http://w3.org/TR/CSS21/colors.html#propdef-background-position|, | ||||||||||
| 176 | |||||||||||
| 177 | 'word-spacing' | ||||||||||
| 178 | => q|http://w3.org/TR/CSS21/text.html#propdef-word-spacing|, | ||||||||||
| 179 | |||||||||||
| 180 | 'page-break-after' | ||||||||||
| 181 | => q|http://w3.org/TR/CSS21/page.html#propdef-page-break-after|, | ||||||||||
| 182 | |||||||||||
| 183 | 'border-color' | ||||||||||
| 184 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-color|, | ||||||||||
| 185 | |||||||||||
| 186 | 'line-height' | ||||||||||
| 187 | => q|http://w3.org/TR/CSS21/visudet.html#propdef-line-height|, | ||||||||||
| 188 | |||||||||||
| 189 | 'speak-header' | ||||||||||
| 190 | => q|http://w3.org/TR/CSS21/tables.html#propdef-speak-header|, | ||||||||||
| 191 | |||||||||||
| 192 | 'width' | ||||||||||
| 193 | => q|http://w3.org/TR/CSS21/visudet.html#propdef-width|, | ||||||||||
| 194 | |||||||||||
| 195 | 'clear' | ||||||||||
| 196 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-clear|, | ||||||||||
| 197 | |||||||||||
| 198 | 'padding' | ||||||||||
| 199 | => q|http://w3.org/TR/CSS21/box.html#propdef-padding|, | ||||||||||
| 200 | |||||||||||
| 201 | 'cursor' | ||||||||||
| 202 | => q|http://w3.org/TR/CSS21/ui.html#propdef-cursor|, | ||||||||||
| 203 | |||||||||||
| 204 | 'float' | ||||||||||
| 205 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-float|, | ||||||||||
| 206 | |||||||||||
| 207 | 'border-right-color' | ||||||||||
| 208 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-right-color|, | ||||||||||
| 209 | |||||||||||
| 210 | 'padding-left' | ||||||||||
| 211 | => q|http://w3.org/TR/CSS21/box.html#propdef-padding-left|, | ||||||||||
| 212 | |||||||||||
| 213 | 'max-width' | ||||||||||
| 214 | => q|http://w3.org/TR/CSS21/visudet.html#propdef-max-width|, | ||||||||||
| 215 | |||||||||||
| 216 | 'top' | ||||||||||
| 217 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-top|, | ||||||||||
| 218 | |||||||||||
| 219 | 'padding-right' | ||||||||||
| 220 | => q|http://w3.org/TR/CSS21/box.html#propdef-padding-right|, | ||||||||||
| 221 | |||||||||||
| 222 | 'font-style' | ||||||||||
| 223 | => q|http://w3.org/TR/CSS21/fonts.html#propdef-font-style|, | ||||||||||
| 224 | |||||||||||
| 225 | 'outline' | ||||||||||
| 226 | => q|http://w3.org/TR/CSS21/ui.html#propdef-outline|, | ||||||||||
| 227 | |||||||||||
| 228 | 'border-right-style' | ||||||||||
| 229 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-right-style|, | ||||||||||
| 230 | |||||||||||
| 231 | 'font-weight' | ||||||||||
| 232 | => q|http://w3.org/TR/CSS21/fonts.html#propdef-font-weight|, | ||||||||||
| 233 | |||||||||||
| 234 | 'min-width' | ||||||||||
| 235 | => q|http://w3.org/TR/CSS21/visudet.html#propdef-min-width|, | ||||||||||
| 236 | |||||||||||
| 237 | 'border-top-width' | ||||||||||
| 238 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-top-width|, | ||||||||||
| 239 | |||||||||||
| 240 | 'text-align' | ||||||||||
| 241 | => q|http://w3.org/TR/CSS21/text.html#propdef-text-align|, | ||||||||||
| 242 | |||||||||||
| 243 | 'outline-style' | ||||||||||
| 244 | => q|http://w3.org/TR/CSS21/ui.html#propdef-outline-style|, | ||||||||||
| 245 | |||||||||||
| 246 | 'border-top-style' | ||||||||||
| 247 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-top-style|, | ||||||||||
| 248 | |||||||||||
| 249 | 'color' | ||||||||||
| 250 | => q|http://w3.org/TR/CSS21/colors.html#propdef-color|, | ||||||||||
| 251 | |||||||||||
| 252 | 'margin' | ||||||||||
| 253 | => q|http://w3.org/TR/CSS21/box.html#propdef-margin|, | ||||||||||
| 254 | |||||||||||
| 255 | 'left' | ||||||||||
| 256 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-left|, | ||||||||||
| 257 | |||||||||||
| 258 | 'direction' | ||||||||||
| 259 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-direction|, | ||||||||||
| 260 | |||||||||||
| 261 | 'text-decoration' | ||||||||||
| 262 | => q|http://w3.org/TR/CSS21/text.html#propdef-text-decoration|, | ||||||||||
| 263 | |||||||||||
| 264 | 'unicode-bidi' | ||||||||||
| 265 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-unicode-bidi|, | ||||||||||
| 266 | |||||||||||
| 267 | 'background-repeat' | ||||||||||
| 268 | => q|http://w3.org/TR/CSS21/colors.html#propdef-background-repeat|, | ||||||||||
| 269 | |||||||||||
| 270 | 'right' | ||||||||||
| 271 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-right|, | ||||||||||
| 272 | |||||||||||
| 273 | 'border-bottom-color' | ||||||||||
| 274 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-bottom-color|, | ||||||||||
| 275 | |||||||||||
| 276 | 'overflow' | ||||||||||
| 277 | => q|http://w3.org/TR/CSS21/visufx.html#propdef-overflow|, | ||||||||||
| 278 | |||||||||||
| 279 | 'page-break-inside' | ||||||||||
| 280 | => q|http://w3.org/TR/CSS21/page.html#propdef-page-break-inside|, | ||||||||||
| 281 | |||||||||||
| 282 | 'margin-top' | ||||||||||
| 283 | => q|http://w3.org/TR/CSS21/box.html#propdef-margin-top|, | ||||||||||
| 284 | |||||||||||
| 285 | 'outline-width' | ||||||||||
| 286 | => q|http://w3.org/TR/CSS21/ui.html#propdef-outline-width|, | ||||||||||
| 287 | |||||||||||
| 288 | 'margin-left' | ||||||||||
| 289 | => q|http://w3.org/TR/CSS21/box.html#propdef-margin-left|, | ||||||||||
| 290 | |||||||||||
| 291 | 'border-right-width' | ||||||||||
| 292 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-right-width|, | ||||||||||
| 293 | |||||||||||
| 294 | 'min-height' | ||||||||||
| 295 | => q|http://w3.org/TR/CSS21/visudet.html#propdef-min-height|, | ||||||||||
| 296 | |||||||||||
| 297 | 'text-transform' | ||||||||||
| 298 | => q|http://w3.org/TR/CSS21/text.html#propdef-text-transform|, | ||||||||||
| 299 | |||||||||||
| 300 | 'text-indent' | ||||||||||
| 301 | => q|http://w3.org/TR/CSS21/text.html#propdef-text-indent|, | ||||||||||
| 302 | |||||||||||
| 303 | 'list-style' | ||||||||||
| 304 | => q|http://w3.org/TR/CSS21/generate.html#propdef-list-style|, | ||||||||||
| 305 | |||||||||||
| 306 | 'padding-top' | ||||||||||
| 307 | => q|http://w3.org/TR/CSS21/box.html#propdef-padding-top|, | ||||||||||
| 308 | |||||||||||
| 309 | 'border-bottom' | ||||||||||
| 310 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-bottom|, | ||||||||||
| 311 | |||||||||||
| 312 | 'z-index' | ||||||||||
| 313 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-z-index|, | ||||||||||
| 314 | |||||||||||
| 315 | 'border-right' | ||||||||||
| 316 | => q|http://w3.org/TR/CSS21/box.html#propdef-border-right|, | ||||||||||
| 317 | |||||||||||
| 318 | 'display' | ||||||||||
| 319 | => q|http://w3.org/TR/CSS21/visuren.html#propdef-display|, | ||||||||||
| 320 | ); | ||||||||||
| 321 | |||||||||||
| 322 | 0 | keys %props; | |||||||||
| 323 | 0 | ▶ | while ( my ($name, $link ) = each %props ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 324 | 0 | my $link_start | |||||||||
| 325 | = qq|<a href="$link" title="CSS Specification: '$name\' property">|; | ||||||||||
| 326 | |||||||||||
| 327 | 0 | @{ $template->{t} }{ | |||||||||
| 328 | 0 | "css_$name", | |||||||||
| 329 | "css_${name}_p", | ||||||||||
| 330 | "css_${name}_c", | ||||||||||
| 331 | "css_${name}_cp", | ||||||||||
| 332 | } = ( | ||||||||||
| 333 | $link_start . "<code>$name</code></a>", | ||||||||||
| 334 | $link_start . "<code>$name</code> property</a>", | ||||||||||
| 335 | $link_start . "$name</a>", | ||||||||||
| 336 | $link_start . "$name property</a>", | ||||||||||
| 337 | ); | ||||||||||
| 338 | } | ||||||||||
| 339 | |||||||||||
| 340 | 0 | keys %pseudo_elements; | |||||||||
| 341 | 0 | ▶ | while ( my ($name, $link ) = each %pseudo_elements ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 342 | 0 | my $link_start | |||||||||
| 343 | = qq|<a href="$link" title="CSS Specification: '$name\' pseudo-element">|; | ||||||||||
| 344 | |||||||||||
| 345 | 0 | @{ $template->{t} }{ | |||||||||
| 346 | 0 | "css_$name", | |||||||||
| 347 | "css_${name}_p", | ||||||||||
| 348 | "css_${name}_c", | ||||||||||
| 349 | "css_${name}_cp", | ||||||||||
| 350 | } = ( | ||||||||||
| 351 | $link_start . "<code>$name</code></a>", | ||||||||||
| 352 | $link_start . "<code>$name</code> pseudo-element</a>", | ||||||||||
| 353 | $link_start . "$name</a>", | ||||||||||
| 354 | $link_start . "$name pseudo-element</a>", | ||||||||||
| 355 | ); | ||||||||||
| 356 | } | ||||||||||
| 357 | |||||||||||
| 358 | 0 | keys %pseudo_classes; | |||||||||
| 359 | 0 | ▶ | while ( my ($name, $link ) = each %pseudo_classes ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 360 | 0 | my $link_start | |||||||||
| 361 | = qq|<a href="$link" title="CSS Specification: '$name\' pseudo-class">|; | ||||||||||
| 362 | |||||||||||
| 363 | 0 | @{ $template->{t} }{ | |||||||||
| 364 | 0 | "css_$name", | |||||||||
| 365 | "css_${name}_p", | ||||||||||
| 366 | "css_${name}_c", | ||||||||||
| 367 | "css_${name}_cp", | ||||||||||
| 368 | } = ( | ||||||||||
| 369 | $link_start . "<code>$name</code></a>", | ||||||||||
| 370 | $link_start . "<code>$name</code> pseudo-class</a>", | ||||||||||
| 371 | $link_start . "$name</a>", | ||||||||||
| 372 | $link_start . "$name pseudo-class</a>", | ||||||||||
| 373 | ); | ||||||||||
| 374 | } | ||||||||||
| 375 | } | ||||||||||
| 376 | |||||||||||
| 377 | 1 | 1; | |||||||||
| 378 | __END__ | ||||||||||