Skip to content

Instantly share code, notes, and snippets.

@Robbert
Robbert / readme.md
Last active October 14, 2026 15:09
Checklist voor maken van SVG iconen voor de NL Design System community

Checklist voor maken van SVG iconen voor de NL Design System community

v1.1.0

Checklist van Robbert op basis van feedback verzameld in de #rijkshuisstijl-community Slack:

  • Gebruik een <svg> element met de volgende attributen:
    • height="1em" en width="1em": hiermee passen de iconen automatisch bij de tekstgrootte, en voorkomt het layout-problemen wanneer CSS niet geladen kan worden
    • viewBox: gebruik een viewbox waardoor de iconen in principe de volledige ruimte vullen. Laat witruimte rondom iconen over aan de code waarin het gebruikt wordt. Er zijn natuurlijk uitzonderingen, wanneer iconen in verhouding tot elkaar juist kleiner moeten zijn. Bijvoorbeeld: voor 1, 2, 3 en 4 streepjes mobiele ontvangst neemt alleen het icoon van 4 streepjes de volledige ruimte in.
  • xmlns="http://www.w3.org/2000/svg"
@Robbert
Robbert / index.html
Last active March 22, 2025 07:37
Utrecht Design System boilerplate
<!DOCTYPE html>
<!-- Gebruik altijd als allereerste onderdeel een DOCTYPE zodat je "Standards mode" gebruikt voor layout, niet "Quirks mode". -->
<!-- TODO: Stel `lang` en `dir` in, zodat de taal van de pagina duidelijk is. -->
<!-- Lees meer over WCAG-succescriterium 3.1.1 Taal van de pagina: https://nldesignsystem.nl/wcag/3.1.1 -->
<!-- TODO: Pas het datamodel van het CMS aan om deze informatie te hebben. -->
<!-- Gebruik CSS van de Root component, voor een aantal doelen: -->
<!-- - Met de Root component, in combinatie met de Body component, kan de volledige hoogte en breedte van de pagina gebruikt kan worden voor de Page Layout. -->
<!-- - De Root component stelt woordafbreking in, zodat de pagina ook goed werkt als die ingezoomd is. -->
<!-- Lees meer over WCAG-succescriterium 1.4.10 Reflow: https://nldesignsystem.nl/wcag/1.4.10 -->
<!-- - De Root component optimaliseert de font rendering. -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example page</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/@utrecht/design-tokens/dist/index.css" />
<link rel="stylesheet" type="text/css" href="https://unpkg.com/@utrecht/component-library-css/dist/index.css" />
<style>
.my-theme {
--utrecht-button-background-color: tomato;
--utrecht-button-color: white;
@Robbert
Robbert / CLA.md
Created December 1, 2020 16:35
NL Design System - Contributor License Agreement (CLA)

CONTRIBUTOR LICENCE AGREEMENT

version 1.00 / 01-12-2020

This text of this document is licensed under the CC0 license.


The State of the Netherlands, Ministry of the Interior and Kingdom Relations (hereinafter: the Ministry) and the NL Design System Community (hereinafter: the Community) would like to utilise the knowledge of third parties in developing digital resources that could contribute to a Design System for the public sector (hereinafter referred to collectively as: the Digital Resources).

@Robbert
Robbert / index.xqy
Created June 19, 2017 19:10
XSLT includes in MarkLogic
xquery version "1.0-ml";
declare namespace xsl = "http://www.w3.org/1999/XSL/Transform";
declare namespace local = "urn:local";
declare function local:prepare-stylesheet($uri, $stylesheet)
{
let $void := xdmp:invoke-function(
function ()
{
@Robbert
Robbert / unicode.js
Created October 8, 2015 14:34
code-generated ternary regex madness
var Unicode = ({blocks:{'Alchemical-Symbols':{test:(function anonymous(n) {
return n >= 0x1F700 && n <= 0x1F77F
})}, 'Alphabetic-Presentation-Forms':{test:(function anonymous(n) {
return n >= 0xFB00 && n <= 0xFB4F
})}, 'Ancient-Greek-Musical-Notation':{test:(function anonymous(n) {
return n >= 0x1D200 && n <= 0x1D24F
})}, 'Ancient-Greek-Numbers':{test:(function anonymous(n) {
return n >= 0x10140 && n <= 0x1018F
})}, 'Ancient-Symbols':{test:(function anonymous(n) {
return n >= 0x10190 && n <= 0x101CF
@Robbert
Robbert / australian-ip.js
Created February 9, 2015 21:53
Australian IP address detection. Fast JavaScript proof of concept.
function isAustralianIP(n) {
return n >= 0x1000000 && (n >= 0x82740000 && (n >= 0xA5760000 && (n >= 0xCB1E1200 && (n >= 0xCBA60000 && (n >= 0xD2D74F00 && (n >= 0xDCEB0000 && (n >= 0xDCF40000 && (n >= 0xDD788000 && (n >= 0xDF1B4000 && (n >= 0xDFFFE800 && (n >= 0xDFFFFF00 || n <= 0xDFFFEBFF) || n <= 0xDFFC7FFF && (n <= 0xDFA57FFF && (n >= 0xDFA56000 || n <= 0xDF821FFF && (n <= 0xDF1DF3FF && (n >= 0xDF1BB000 && (n >= 0xDF1DF000 || n <= 0xDF1BB3FF) || n <= 0xDF1B67FF && (n <= 0xDF1B43FF || n >= 0xDF1B6000)) || n >= 0xDF820C00)) || n >= 0xDFFC0000)) || n <= 0xDF1B1FFF && (n >= 0xDD85C000 && (n >= 0xDF197000 && (n >= 0xDF1B1391 || n <= 0xDF1B138F && (n <= 0xDF19E7FF && (n >= 0xDF19E000 || n <= 0xDF1977FF) || n >= 0xDF1B0000)) || n <= 0xDEE55FFF && (n >= 0xDDC7D000 && (n >= 0xDEE55800 || n <= 0xDDC7DFFF) || n <= 0xDD85DFFF)) || n <= 0xDD799FFF && (n >= 0xDD798000 || n <= 0xDD795FFF && (n >= 0xDD794000 || n <= 0xDD78A7FF)))) || n <= 0xDCFDFFFF && (n >= 0xDCF7B000 && (n <= 0xDCF7B7FF || n >= 0xDCFD0000) || n <= 0xDC
/**
* @author Robbert Broersma <http://robbertbroersma.nl/>
* @license © 2013, The Knights Who Say NIH B.V. All rights reserved.
*/
var List = {};
/**
* Works like arr.splice(), but without constructing an array
* with the removed values to reduce garbage collection.
@Robbert
Robbert / mediatype.php
Created October 12, 2013 12:25
PHP function for testing for a media type in a Content-Type header, taking in account case insensitivity and the optional parameters like charset.
<?php
/**
* @author Robbert Broersma <http://robbertbroersma.nl/>
* @license Public Domain
*/
/**
* @see http://tools.ietf.org/html/rfc2046#appendix-A
* @see http://www.w3.org/Protocols/rfc1341/4_Content-Type.html
<?php
/*
# Example usage:
http_to_file("http://localhost/~robbert/example.com/img/");
// returns "/Users/Robbert/Sites/example.com/img/";
file_to_http("/Users/Robbert/Sites/example.com/style/mobile.css");