• Stars
    star
    1,848
  • Rank 25,101 (Top 0.5 %)
  • Language
    CSS
  • Created almost 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Let’s take a look inside your <head>…

🧠 ct.css – Let’s take a look inside your <head>

Computed tomography of the head uses a series of X-rays in a CT scan of the head…
wikipedia.org/Computed_tomography_of_the_head

Your <head> is the single biggest render-blocking part of your page—ensuring it is well-formed is critical. ct.css is a diagnostic CSS snippet that exposes potential performance issues in your page’s <head> tags.

Example Output

  • Red: This is an error and should be addressed.
  • Orange: This could be problematic in certain scenarios.
  • Green: This is fine and is purely informational.
  • Solid: This file is the problem.
  • Dashed: Another file(s) are causing problems with this file.

Simple Usage

Paste this anywhere in your HTML:

<link rel="stylesheet" href="https://csswizardry.com/ct/ct.css" class="ct" />

Chrome Snippet

Run Snippets Of JavaScript On Any Page With Chrome DevTools

(function(){
  var ct = document.createElement('link');
  ct.rel = 'stylesheet';
  ct.href = 'https://csswizardry.com/ct/ct.css';
  ct.classList.add('ct');
  document.head.appendChild(ct);
}());

Limitations

  • Non-matching media types: Currently, ct.css only takes print stylesheets into account. This means that you may experience false-positives for other non-blocking stylesheets.
  • Injected script elements: ct.css, as with all CSS, acts against the DOM and not the HTML. As such, injected script elements will be falsely flagged as blocking.
    • Similarly, any script elements that are removed from the DOM will not be flagged.
  • Third-party blocking resources: The check for whether or not something is a third party is naive at best.
  • CSP Issues: If your app is blocking CSS from the csswizardry.com origin, either self-host the ct.css file, or paste its contents into <style class="ct">…</style> tags anywhere in your page.

More Repositories

1

inuit.css

Powerful, scalable, Sass-based, BEM, OOCSS framework.
CSS
3,838
star
2

CSS-Guidelines

High-level guidelines for writing manageable, maintainable CSS
3,653
star
3

csswizardry-grids

Simple, fluid, nestable, flexible, Sass-based, responsive grid system.
CSS
1,491
star
4

typecsset

A small Sass library for setting type on the web.
CSS
713
star
5

csswizardry.github.com

My site.
HTML
463
star
6

nudge

Warn developers about improper selector usage
CSS
225
star
7

beautons

A beautifully simple button toolkit
CSS
211
star
8

csscv

A simple, opinionated stylesheet for formatting semantic HTML to look like a CSS file.
CSS
205
star
9

vanilla

My personal starting point for new builds.
HTML
184
star
10

discovr

CSS Architecture workshop files
CSS
172
star
11

frcss

CSS
107
star
12

dotfiles

Starting small… my dotfiles for a few things.
Vim Script
102
star
13

inuit.css-web-template

Web template for housing the inuit.css framework as submodule
CSS
88
star
14

ama

Ask me anything!
58
star
15

recipes

Collection of things I like cooking
42
star
16

pr.ofile.me

Digital, mobile business cards
40
star
17

hry.rbrts.me

Personal hub site.
Racket
20
star
18

build-along-1

The first CSS Wizardry build-along
17
star
19

css-architecture

Workshop materials
CSS
16
star
20

fluid-grids

PHP
15
star
21

extend-vs-mixin

CSS
13
star
22

work

Dedicated ‘work’ page for CSS Wizardry
HTML
12
star
23

fep

9
star
24

sampenrose.co.uk

Portfolio
6
star
25

demo-component

CSS
5
star
26

harry.is

HTML
3
star
27

gilliansibthorpe.com

HTML
2
star
28

questions-for-consultants-issues

Public issue tracker for my eBook, Questions for Consultants
2
star
29

test

1
star
30

wishlist

Because I’m greedy like that…
1
star
31

press

Bios and stuff…
1
star
32

toolkit-core

CSS
1
star
33

piccalilli-burger-menu-demo

HTML
1
star
34

markrabey.github.io

CSS
1
star
35

nightingale-demo

HTML
1
star
36

bower-demo

CSS
1
star