-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
use base 36 for style classes
- Loading branch information
Showing
18 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// https://github.com/darkskyapp/string-hash/blob/master/index.js | ||
export default function hash(str: string): number { | ||
export default function hash(str: string): string { | ||
let hash = 5381; | ||
let i = str.length; | ||
|
||
while (i--) hash = ((hash << 5) - hash) ^ str.charCodeAt(i); | ||
return hash >>> 0; | ||
return (hash >>> 0).toString(36); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
div.svelte-724714405,.svelte-724714405 div{color:red} | ||
div.svelte-300476157,.svelte-300476157 div{color:green} | ||
div.svelte-bzh57p,.svelte-bzh57p div{color:red} | ||
div.svelte-4yw8vx,.svelte-4yw8vx div{color:green} |
6 changes: 3 additions & 3 deletions
6
test/server-side-rendering/samples/styles-nested/_actual.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div class="svelte-724714405">red</div> | ||
<div class="svelte-300476157">green: foo</div> | ||
<div class="svelte-bzh57p">red</div> | ||
<div class="svelte-4yw8vx">green: foo</div> | ||
|
||
|
||
|
||
<div class="svelte-300476157">green: bar</div> | ||
<div class="svelte-4yw8vx">green: bar</div> | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
test/server-side-rendering/samples/styles-nested/_expected.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
div.svelte-724714405,.svelte-724714405 div{color:red} | ||
div.svelte-300476157,.svelte-300476157 div{color:green} | ||
div.svelte-bzh57p,.svelte-bzh57p div{color:red} | ||
div.svelte-4yw8vx,.svelte-4yw8vx div{color:green} |
6 changes: 3 additions & 3 deletions
6
test/server-side-rendering/samples/styles-nested/_expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div class="svelte-724714405">red</div> | ||
<div class="svelte-300476157">green: foo</div> | ||
<div class="svelte-bzh57p">red</div> | ||
<div class="svelte-4yw8vx">green: foo</div> | ||
|
||
|
||
|
||
<div class="svelte-300476157">green: bar</div> | ||
<div class="svelte-4yw8vx">green: bar</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
div.svelte-724714405,.svelte-724714405 div{color:red} | ||
div.svelte-bzh57p,.svelte-bzh57p div{color:red} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<div class="svelte-724714405">red</div> | ||
<div class="svelte-bzh57p">red</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
div.svelte-724714405,.svelte-724714405 div{color:red} | ||
div.svelte-bzh57p,.svelte-bzh57p div{color:red} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<div class="svelte-724714405">red</div> | ||
<div class="svelte-bzh57p">red</div> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.