J'ai lut ceci sur un site
Visiblement on peut definir les variables a l'aide de pearl
utilisable dans les CSS
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #!/usr/bin/perl # Tell Perl to warn me if I'm writing bad code use strict; use warnings; # Define some values I might wish to use my $main_foreground_colour = "black"; my $main_background_colour = "white"; # Define a set of property/value pairs I wish # to use more than once. my $box = <<END; width: 12em; margin: 0.5em; padding: 0.5em; border: solid 1px black; END
Qu'en pensez vous ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 # Then print the stylesheet using those variables print <<END; body { background-color: $main_background_colour; color: $main_foreground_colour; } .oddBoxOut { $box float: left; } .evenboxOut { $box float: right; } END
Partager