-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test local css imports in production
- Update steal and steal-tools: [email protected] includes the fix to make the local css @import test pass. - Update test assertion text: Local css imports are not inlined in production but they should still work.
- Loading branch information
Manuel Mujica
committed
Jun 27, 2017
1 parent
10b18c4
commit 432977e
Showing
10 changed files
with
74 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var path = require("path"); | ||
var stealTools = require("steal-tools"); | ||
|
||
module.exports = stealTools.build({ | ||
main: "main", | ||
config: path.join(__dirname, "stealconfig.js") | ||
}, { | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
p { | ||
font-size: 30px; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import url("foo.css"); | ||
|
||
body { | ||
padding-top: 50px; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require("./main.css"); | ||
|
||
var p = document.getElementsByTagName("p").item(0); | ||
var s = getComputedStyle(p); | ||
|
||
if (window.assert) { | ||
assert.equal(s.fontSize, "30px", "should load the @import"); | ||
done(); | ||
} | ||
else { | ||
console.log("fontSize: ", s.fontSize); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>css local @import</title> | ||
</head> | ||
<body> | ||
<script> | ||
window.done = window.parent.done; | ||
window.assert = window.parent.assert; | ||
</script> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. | ||
Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at | ||
nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec | ||
tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget | ||
nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, | ||
per inceptos himenaeos. | ||
</p> | ||
<script src="./dist/steal.production.js"></script> | ||
</body> | ||
</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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
steal.config({ | ||
ext: { | ||
"css": "steal-css" | ||
}, | ||
paths: { | ||
"steal-css": "../../css.js" | ||
}, | ||
cssOptions: { | ||
timeout: '15' | ||
} | ||
}); |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
} | ||
#test-relative { | ||
background-image: url("locate://bootstrap/other.png"); | ||
} | ||
} |
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