Last active
July 20, 2017 17:27
-
-
Save benfavre/76fd32c1dbf64a0fcd31dede97a2aed1 to your computer and use it in GitHub Desktop.
Css balisage pour abovethefold parsing
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>Test</title> | |
</head> | |
<script> | |
<!-- Include Dynamique côté client --> | |
function loadCSS( href, before, media, callback ){ ... } | |
loadCSS( '/path/to/your/full.css' ); | |
</script> | |
<style type="text/css"> | |
<?php | |
include('parser.php'); | |
$parser = new CssParser(); | |
$parser->load_string('/path/to/your/full.css'); | |
$parser->parse(); | |
/* Couper le fichier d'après le balisage et remplacer les liens */ | |
} | |
?> | |
</style> | |
<body> | |
Contenu | |
footer | |
<noscript> | |
<!-- Include pour pas de JS --> | |
<link href='/path/to/your/full.css' rel='stylesheet' type='text/css'> | |
</noscript> | |
</body> | |
</html> |
This file contains hidden or 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
/* === ABOVESTART === */ | |
.shell { | |
width:960px; | |
} | |
/* === ABOVEEND === */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment