File tree Expand file tree Collapse file tree 4 files changed +7
-28
lines changed Expand file tree Collapse file tree 4 files changed +7
-28
lines changed Original file line number Diff line number Diff line change @@ -642,28 +642,14 @@ less.Parser = function Parser(env) {
642
642
643
643
if ( input . charAt ( i ) !== 'u' || ! $ ( / ^ u r l \( / ) ) return ;
644
644
value = $ ( this . entities . quoted ) || $ ( this . entities . variable ) ||
645
- $ ( this . entities . dataURI ) || $ ( / ^ [ - \w % @ $ \/ . & = : ; # + ? ~ ] + / ) || "" ;
645
+ $ ( / ^ (?: (?: \\ [ \( \) ' " ] ) | [ ^ \( \) ' " ] ) + / ) || "" ;
646
646
647
647
expect ( ')' ) ;
648
648
649
- return new ( tree . URL ) ( ( value . value != null || value . data || value instanceof tree . Variable )
649
+ return new ( tree . URL ) ( ( value . value != null || value instanceof tree . Variable )
650
650
? value : new ( tree . Anonymous ) ( value ) , imports . paths ) ;
651
651
} ,
652
652
653
- dataURI : function ( ) {
654
- var obj ;
655
-
656
- if ( $ ( / ^ d a t a : / ) ) {
657
- obj = { } ;
658
- obj . mime = $ ( / ^ [ ^ \/ ] + \/ [ ^ , ; ) ] + / ) || '' ;
659
- obj . charset = $ ( / ^ ; \s * c h a r s e t = [ ^ , ; ) ] + / ) || '' ;
660
- obj . base64 = $ ( / ^ ; \s * b a s e 6 4 / ) || '' ;
661
- obj . data = $ ( / ^ , \s * [ ^ ) ] + / ) ;
662
-
663
- if ( obj . data ) { return obj }
664
- }
665
- } ,
666
-
667
653
//
668
654
// A Variable entity, such as `@fink`, in
669
655
//
Original file line number Diff line number Diff line change 1
1
( function ( tree ) {
2
2
3
3
tree . URL = function ( val , paths ) {
4
- if ( val . data ) {
5
- this . attrs = val ;
6
- } else {
7
- this . value = val ;
8
- this . paths = paths ;
9
- }
4
+ this . value = val ;
5
+ this . paths = paths ;
10
6
} ;
11
7
tree . URL . prototype = {
12
8
toCSS : function ( ) {
13
- return "url(" + ( this . attrs ? 'data:' + this . attrs . mime + this . attrs . charset + this . attrs . base64 + this . attrs . data
14
- : this . value . toCSS ( ) ) + ")" ;
9
+ return "url(" + this . value . toCSS ( ) + ")" ;
15
10
} ,
16
11
eval : function ( ctx ) {
17
- if ( this . attrs ) {
18
- return this ;
19
- }
20
-
21
12
var val = this . value . eval ( ctx ) ;
22
13
23
14
// Add the base path if the URL is relative and we are in the browser
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ p + h1 {
84
84
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
85
85
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC);
86
86
background-image : url (data:image/x-png, f9difSSFIIGFIFJD1f982FSDKAA9==);
87
+ background-image : url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400 \), 700);
87
88
}
88
89
# svg-data-uri {
89
90
background : transparent url ('data:image/svg+xml, <svg version="1.1"><g></g></svg>' );
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ p + h1 {
94
94
k//+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4U
95
95
kg9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC ) ;
96
96
background-image : url(data:image/x-png,f9difSSFIIGFIFJD1f982FSDKAA9 ==) ;
97
+ background-image : url(http://fonts.googleapis.com/css?family=\"Rokkitt\":\(400 \) ,700 );
97
98
}
98
99
99
100
#svg-data-uri {
You can’t perform that action at this time.
0 commit comments