Skip to content

Commit

Permalink
Convert tabs to spaces in non-JS files. (#404)
Browse files Browse the repository at this point in the history
Also add EOF missing newlines.
  • Loading branch information
XhmikosR committed Feb 24, 2021
1 parent bf029b7 commit 2ad0a52
Show file tree
Hide file tree
Showing 24 changed files with 8,227 additions and 8,227 deletions.
30 changes: 15 additions & 15 deletions test/fixture/css/main.css
@@ -1,26 +1,26 @@
body {
margin: 0;
padding: 2em;
font-family: Arial, Helvetica, sans-serif;
margin: 0;
padding: 2em;
font-family: Arial, Helvetica, sans-serif;
}
.icon-background {
display: inline-block;
background-repeat: no-repeat;
text-indent: 200%;
white-space: nowrap;
overflow: hidden;
border: 1px solid #ccc;
display: inline-block;
background-repeat: no-repeat;
text-indent: 200%;
white-space: nowrap;
overflow: hidden;
border: 1px solid #ccc;
}
table {
border-collapse: collapse;
border-collapse: collapse;
}
td, th {
padding: 1em;
padding: 1em;
}
th {
text-align: left;
text-align: left;
}
td {
border-top: 1px solid #ccc;
height: 100px;
}
border-top: 1px solid #ccc;
height: 100px;
}
88 changes: 44 additions & 44 deletions test/fixture/html/sprite/weather-defs.html
@@ -1,64 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>svg-sprite example: SVG sprite (defs mode)</title>
<link rel="stylesheet" href="../../css/main.css"/>
<style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>svg-sprite example: SVG sprite (defs mode)</title>
<link rel="stylesheet" href="../../css/main.css"/>
<style>
.icon-original {
width: 48px;
height: 48px;
width: 48px;
height: 48px;
}
.icon-double {
width: 96px;
height: 96px;
width: 96px;
height: 96px;
}
.icon-weather-clear-svg {
background-image: url(../../svg/sprite/weather-svg.svg);
background-image: url(../../svg/sprite/weather-svg.svg);
}
.icon-weather-clear-png {
background-image: url(../../png/sprite/weather-svg.png);
background-image: url(../../png/sprite/weather-svg.png);
}
.icon-absolute {
background-position: 0 -384px;
background-position: 0 -384px;
}
.icon-relative {
background-position: 0 88.888888%;
/* y-part 80% / (100% - 10%) = */
/* x-part 173px / (1000px - 80px) = 0.1880434783 ->> 18.80434783% */
background-position: 0 88.888888%;
/* y-part 80% / (100% - 10%) = */
/* x-part 173px / (1000px - 80px) = 0.1880434783 ->> 18.80434783% */
}
.icon-background {
background-size: 100% auto;
background-size: 100% auto;
}
pre {
padding: 1em;
font-size: 120%;
border: 1px solid #ccc;
padding: 1em;
font-size: 120%;
border: 1px solid #ccc;
}
code {
font-size: 120%;
background-color: #eee;
padding: .1em .3em;
font-size: 120%;
background-color: #eee;
padding: .1em .3em;
}
</style>
</head>
<body>
<h1>SVG sprite (defs mode)</h1>
<table>
<thead>
<tr>
<th>SVG</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<svg viewBox="0 0 48 48" class="icon">
<use xlink:href="../../svg/sprite/weather-defs#weather-clear"></use>
</svg>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</style>
</head>
<body>
<h1>SVG sprite (defs mode)</h1>
<table>
<thead>
<tr>
<th>SVG</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<svg viewBox="0 0 48 48" class="icon">
<use xlink:href="../../svg/sprite/weather-defs#weather-clear"></use>
</svg>
</td>
</tr>
</tbody>
</table>
</body>
</html>
146 changes: 73 additions & 73 deletions test/fixture/html/sprite/weather-svg.html
@@ -1,93 +1,93 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>svg-sprite example: SVG sprite (background mode)</title>
<link rel="stylesheet" href="../../css/main.css"/>
<style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>svg-sprite example: SVG sprite (background mode)</title>
<link rel="stylesheet" href="../../css/main.css"/>
<style>
.icon-original {
width: 48px;
height: 48px;
width: 48px;
height: 48px;
}
.icon-double {
width: 96px;
height: 96px;
width: 96px;
height: 96px;
}
.icon-weather-clear-svg {
background-image: url(../../svg/sprite/weather-svg.svg);
background-image: url(../../svg/sprite/weather-svg.svg);
}
.icon-weather-clear-png {
background-image: url(../../png/sprite/weather-svg.png);
background-image: url(../../png/sprite/weather-svg.png);
}
.icon-absolute {
background-position: 0 -384px;
background-position: 0 -384px;
}
.icon-relative {
background-position: 0 88.888888%;
/* y-part 80% / (100% - 10%) = */
/* x-part 173px / (1000px - 80px) = 0.1880434783 ->> 18.80434783% */
background-position: 0 88.888888%;
/* y-part 80% / (100% - 10%) = */
/* x-part 173px / (1000px - 80px) = 0.1880434783 ->> 18.80434783% */
}
.icon-background {
background-size: 100% auto;
background-size: 100% auto;
}
pre {
padding: 1em;
font-size: 120%;
border: 1px solid #ccc;
padding: 1em;
font-size: 120%;
border: 1px solid #ccc;
}
code {
font-size: 120%;
background-color: #eee;
padding: .1em .3em;
font-size: 120%;
background-color: #eee;
padding: .1em .3em;
}
</style>
</head>
<body>
<h1>SVG sprite (background mode)</h1>
<table>
<thead>
<tr>
<th>Positioning</th>
<th>Size</th>
<th>SVG</th>
<th>PNG</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>Absolute (px)</td>
<td>Original</td>
<td><i class="icon-background icon-original icon-absolute icon-weather-clear-svg">Clear weather icon</i></td>
<td><i class="icon-background icon-original icon-absolute icon-weather-clear-png">Clear weather icon</i></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Absolute (px)</td>
<td>Double</td>
<td><i class="icon-background icon-double icon-absolute icon-weather-clear-svg">Clear weather icon</i></td>
<td><i class="icon-background icon-double icon-absolute icon-weather-clear-png">Clear weather icon</i></td>
<td>Can't work without setting an absolute size for <code>background-size</code>. Scaling the absolutely positioned sprite screws up the image offset (which would have to be scaled as well)</td>
</tr>
<tr>
<td>Relative (%)</td>
<td>Original</td>
<td><i class="icon-background icon-original icon-relative icon-weather-clear-svg">Clear weather icon</i></td>
<td><i class="icon-background icon-original icon-relative icon-weather-clear-png">Clear weather icon</i></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Relative (%)</td>
<td>Double</td>
<td><i class="icon-background icon-double icon-relative icon-weather-clear-svg">Clear weather icon</i></td>
<td><i class="icon-background icon-double icon-relative icon-weather-clear-png">Clear weather icon</i></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>The formular for calculating the relative position of a particular sprite image is as follows:</p>
<pre>$percentage = $imageOffset / ($spriteDimension - $imageDimension) * 100%</pre>
<p>This holds true for both absolute as well als relative values. The following example will display the 7th image of the above sprites, with each original image being 48 x 48 pixels and the sprites holding 10 images each:</p>
<pre>$percentage = 288px / (480px - 48px) = 60% / (100% - 10%) = 0.666666 = 66.666666%</pre>
</body>
</html>
</style>
</head>
<body>
<h1>SVG sprite (background mode)</h1>
<table>
<thead>
<tr>
<th>Positioning</th>
<th>Size</th>
<th>SVG</th>
<th>PNG</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>Absolute (px)</td>
<td>Original</td>
<td><i class="icon-background icon-original icon-absolute icon-weather-clear-svg">Clear weather icon</i></td>
<td><i class="icon-background icon-original icon-absolute icon-weather-clear-png">Clear weather icon</i></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Absolute (px)</td>
<td>Double</td>
<td><i class="icon-background icon-double icon-absolute icon-weather-clear-svg">Clear weather icon</i></td>
<td><i class="icon-background icon-double icon-absolute icon-weather-clear-png">Clear weather icon</i></td>
<td>Can't work without setting an absolute size for <code>background-size</code>. Scaling the absolutely positioned sprite screws up the image offset (which would have to be scaled as well)</td>
</tr>
<tr>
<td>Relative (%)</td>
<td>Original</td>
<td><i class="icon-background icon-original icon-relative icon-weather-clear-svg">Clear weather icon</i></td>
<td><i class="icon-background icon-original icon-relative icon-weather-clear-png">Clear weather icon</i></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Relative (%)</td>
<td>Double</td>
<td><i class="icon-background icon-double icon-relative icon-weather-clear-svg">Clear weather icon</i></td>
<td><i class="icon-background icon-double icon-relative icon-weather-clear-png">Clear weather icon</i></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>The formular for calculating the relative position of a particular sprite image is as follows:</p>
<pre>$percentage = $imageOffset / ($spriteDimension - $imageDimension) * 100%</pre>
<p>This holds true for both absolute as well als relative values. The following example will display the 7th image of the above sprites, with each original image being 48 x 48 pixels and the sprites holding 10 images each:</p>
<pre>$percentage = 288px / (480px - 48px) = 60% / (100% - 10%) = 0.666666 = 66.666666%</pre>
</body>
</html>
4 changes: 2 additions & 2 deletions test/fixture/json/variables.invalid.json
@@ -1,9 +1,9 @@
{
{
"red":"#f00",
"green":"#0f0",
"blue":"#00f",
"cyan":"#0ff",
"magenta":"#f0f",
"yellow":"#ff0",
"black":"#000
}
}
4 changes: 2 additions & 2 deletions test/fixture/json/variables.json
@@ -1,9 +1,9 @@
{
{
"red":"#f00",
"green":"#0f0",
"blue":"#00f",
"cyan":"#0ff",
"magenta":"#f0f",
"yellow":"#ff0",
"black":"#000"
}
}
48 changes: 24 additions & 24 deletions test/fixture/svg/animation/keyframes.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2ad0a52

Please sign in to comment.