Skip to content

Commit

Permalink
Preventing FOUC (flash of unstyled content).
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedas committed May 29, 2018
1 parent b443b2b commit 81b87ba
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion default/web_tt2/crash.tt2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="[% lang %]" xml:lang="[% lang %]">
<html class="no-js" lang="[% lang %]" xml:lang="[% lang %]">
<!-- crash.tt2 -->
<head>
<meta charset="UTF-8" />
Expand Down
24 changes: 21 additions & 3 deletions default/web_tt2/css.tt2
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,22 @@ q:before, q:after {
content: none;
}

[%# Compat. with Fooundation 5. ~%]
ul.row {
width: 100%;
/***
* Foundation 6: Preventing FOUC.
*/

.no-js .top-bar {
display: none;
}

@media screen and (min-width: 40em) {
.no-js .top-bar {
display: block;
}

.no-js .title-bar {
display: none;
}
}

/**
Expand Down Expand Up @@ -571,6 +584,11 @@ section.home-submenu a:hover span i.fa-envelope, section.home-submenu a:hover sp
color: [% color_7 %];
}

[%# Compat. with Fooundation 5. ~%]
ul.row {
width: 100%;
}

/* Tables */
table {
background-color: [% color_7 %];
Expand Down
2 changes: 1 addition & 1 deletion default/web_tt2/main.tt2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="[% lang %]" xml:lang="[% lang %]">
<html class="no-js" lang="[% lang %]" xml:lang="[% lang %]">
<!-- main.tt2 -->
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion default/web_tt2/tt2_error.tt2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="[% lang %]" xml:lang="[% lang %]">
<html class="no-js" lang="[% lang %]" xml:lang="[% lang %]">
<!-- tt2_error.tt2 -->
<head>
<meta charset="UTF-8" />
Expand Down

0 comments on commit 81b87ba

Please sign in to comment.