chore: add data-optimizable="true" attribute on optimizable <style>

This commit is contained in:
lowlighter
2021-11-25 20:45:37 -05:00
parent c009ba33e3
commit 56adec4a9e
7 changed files with 7 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="99999" class="<%%= !animated ? 'no-animations' : '' %>">
<defs><style><%%= fonts %></style></defs>
<style><%%= style %></style>
<style data-optimizable="true"><%%= style %></style>
<foreignObject x="0" y="0" width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 562 B

View File

@@ -227,7 +227,7 @@ The base structure for rendering looks like below:
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="99999" class="<%= !animated ? 'no-animations' : '' %>">
<defs><style><%= fonts %></style></defs>
<style><%= style %></style>
<style data-optimizable="true"><%= style %></style>
<foreignObject x="0" y="0" width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">

View File

@@ -1,7 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="<%= large ? 960 : columns ? '100%' : 480 %>" height="99999" class="<%= large ? 'large' : columns ? 'columns' : '' %> <%= !animated ? 'no-animations' : '' %>">
<defs><style><%= fonts %></style></defs>
<style><%= style %></style>
<style data-optimizable="true"><%= style %></style>
<foreignObject x="0" y="0" width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" class="items-wrapper">

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -23,7 +23,7 @@
</div>
</div>
<% { const n = plugins.skyline.animation.length, width = plugins.skyline.width, height = plugins.skyline.height %>
<style>
<style data-optimizable="true">
@keyframes skyline-animation-frame {
100% { transform: translateX(-100%); }
}

View File

@@ -41,7 +41,7 @@
</section>
</div>
<% if (plugins.stackoverflow.lines) { %>
<style>
<style data-optimizable="true">
.stackoverflow .body {
display: -webkit-box;
-webkit-box-orient: vertical;

View File

@@ -2,7 +2,7 @@
<defs><style><%= fonts %></style></defs>
<style>
<style data-optimizable="true">
<%= style %>
</style>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -6,7 +6,7 @@
<defs><style><%= fonts %></style></defs>
<style>
<style data-optimizable="true">
<%= style %>
.stdin, .stdout {
animation-duration: <%= meta.animations.stdin %>s;

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB