= webdev == using curl for a submit-like POST request curl --data "param=value" http://lukas-prokop.at/ == disabling HTTP TRACE for security reasons on Apache RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] == Set windows cmd.exe to UTF-8 chcp 65001 == ARIA landmark roles role="X" where X is one of {application banner complementary contentinfo form main navigation search} == viewport sizes mobile: …–440px tablet: 400–880px desktop: >880px @font-face { font-family: "Open Sans"; src: url("path.woff2") format("woff2"), url("path.woff") format("woff"), url("path.ttf") format("truetype"), url("path.otf") format("opentype"); } == Javascript frameworks Vue, React, Tailwind, Vite == WebGL https://webglfundamentals.org/ == WebAssembly https://wasmbyexample.dev/home.en-us.html == CSS === add URL with inline data 1. echo '' | base64 2. remove line breaks in output 3. replace "…" in the following text with the previous result: ".myfancyicon::before { content: url(data:image/svg+xml;base64,…); }" This can also be done with font files, e.g. "font-family: MyFont; src:url(data:application/font-woff2;charset=utf-8;base64, … )" === always recommended box-sizing: border-box; === meyer reset /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } === Generic CSS attributes all attribute accept [initial], [inherit], [unset], and [revert] === Web typography web-typography related CSS attributes glyph-related: initial-letter size and sink for dropped, raised, and sunken initial letters; [ ] for " lines tall, baseline at line " font font-family specifies a prioritized list of one or more font family names and/or generic family names for the selected element: [serif], [sans-serif], [cursive], [monospace], [fantasy], [system-ui], [ui-serif], [ui-sans-serif], [ui-monospace], [ui-rounded], [math], [fangsong], … font-size sets the size of the font. Changing the font size also updates the sizes of the font size-relative units, such as em, ex, and so forth: [xx-small], …, [medium], …, [xxx-large], [smaller], [larger], [12px], [0.8em], [80%], … font-style sets whether a font should be styled with a normal, italic, or oblique face from its font-family: [normal], [italic], [oblique], [oblique 10deg] font-variant font-variant-alternates controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in @font-feature-values: [normal], [historical-forms], [stylistic(user-defined-ident)], [character-variant(user-defined-ident)], [annotation(user-defined-ident)], … font-variant-caps controls the use of alternate glyphs used for small or petite capitals or for titling: [normal], [small-caps], [all-small-caps], [petite-caps], [all-petite-caps], [unicase], [titling-caps] font-variant-east-asian controls the use of alternate glyphs for CJK: [normal], [ruby], [jis78], [jis83], [jis90], [jis04], [simplified], [traditional], [full-width], [proportional-width], [ruby full-width jis83], … font-variant-emoji specifies the default presentation style for displaying emojis: [normal], [text], [emoji], [unicode] font-variant-ligatures controls which ligatures and contextual forms are used in the textual content of the elements it applies to: [normal], [none], [common-ligatures], [discretionary-ligatures], [historical-ligatures], [contextual] … or the same with "no-" prepended font-variant-numeric usage of alternate glyphs for numbers, fractions, and ordinal markers: [normal], [ordinal], [slashed-zero], [lining-nums], [oldstyle-nums], [proportional-nums], [tabular-nums], [diagonal-fractions], [stacked-fractions], [oldstyle-nums stacked-fractions] font-variant-position controls the use of alternate, smaller glyphs that are positioned as superscript or subscript: [normal], [sub], [super] font-weight sets the weight (or boldness) of the font: [normal], [bold], [bolder], [lighter], or some numeric value like [700] font-feature-settings controls advanced typographic features in OpenType fonts: ["smcp" on] ["swsh" 2] ["smcp", "swsh" 2], … font-kerning sets the use of the kerning information stored in a font: [auto], [normal], [none] font-language-override controls the use of language-specific glyphs in a typeface: [normal], ["ENG"], ["TRK"], … font-optical-sizing sets whether text rendering is optimized for viewing at different sizes: [none], [auto] font-palette specifies one of the many palettes contained in a color font that a user agent may use for the font: [normal], [light], [dark], [--var-ref], [palette-mix(in lch, --blue, --yellow)] font-size-adjust provides a way to modify the size of lowercase letters relative to the size of uppercase letters, which defines the overall font-size: [none], [from-font], [ex-height 0.5], [cap-height 2], [ch-width 3], [from-font 3], … font-synthesis font-synthesis-position synthesize the subscript and superscript "position" typefaces when they are missing in a font family? yes [auto] or no [none] font-synthesis-small-caps synthesize the small-caps typefaces when they are missing in a font family? yes [auto] or no [none] font-synthesis-style synthesize the oblique typefaces when they are missing in a font family? yes [auto], yes if font-style:italic is not set [oblique-only], or no [none] font-synthesis-weight synthesize the bold typefaces when they are missing in a font family? yes [auto] or no [none] font-variation-settings provides low-level control over variable font characteristics by letting you specify the four letter axis names of the characteristics you want to vary along with their values: ["xhgt" 0.7], ["wght" 50], … text-rendering (taken over from SVG) [optimizeLegibility], [geometricPrecision], [optimizeSpeed]? tab-size space representing a U+0009 HORIZONTAL TAB word/span level: quotes sets how the browser should render quotation marks via : two strings text-autospace spacing when text switches between CJK and non-CJK characters text-box text-box-trim remove space between X and text box (trim-start) or space between baseline and text box (trim-end) text-box-edge X is {upper end of capital letters [cap], text box [text], or x-height [ex]} text-combine-upright vertical text only, shall text be written horizontally [all] or e.g. arabic digits of a year 90° tilted downwards [none]? tate-chū-yoko "縦中横" in Japanese, or as "橫向文字" in Chinese. text-decoration text-decoration-color color of the decoration text-decoration-line position of the line text-decoration-skip which parts shall be skipped? [spaces]? [objects] like inline images? [leading-spaces]? [trailing-spaces]? text-decoration-skip-ink shall glyph ascenders and descenders be skipped? yes [all] or no [none]? or the unspecified default mode [auto]? text-decoration-style style: [solid]? [double]? [dotted]? [dashed]? [wavy]? text-decoration-thickness thickness of the decoration text-emphasis emphasis as often done in CJK writing (marks above text) text-emphasis-color color of the emphasis marks text-emphasis-position [over] or [under]? and [right] or [left]? text-emphasis-style [triangle], [filled], [double-circle], a Unicode character, …? text-shadow which shadow shall be applied (x- & y-offset & blur radius & color) text-spacing-trim set internal spacing for CJK punctuation characters and at start or end of text lines if the font supports OpenType Alternate Half Widths (halt) or Contextual Half-width Spacing (chws) feature text-transform replace text by similar characters: [uppercase], [lowercase], [capitalize], [full-width], [full-size-kana], [math-auto], … text-underline-offset adjust offset by some if text-decoration:underline is set text-underline-position adjust position of underline if text-decoration:underline is set, [auto], [under], (in vertical writing) [left], or (in vertical writing) [right] unicode-bidi together with direction, defines how bidirectional text in a document works: [normal], [bidi-override], [plaintext], [isolate-override] white-space sets how white space inside an element is handled: [normal], [pre], [pre-wrap], [pre-line], [wrap], [collapse], [preserve nowrap] white-space-collapse controls how white space inside an element is collapsed: [collapse], [preserve], [preserve-breaks], [preserve-spaces], [break-spaces] word-break sets whether line breaks appear wherever the text would otherwise overflow its content box: [normal], [break-all], [keep-all], [break-word] word-spacing sets the length of space between words and between tags: some line-related: alignment-baseline (taken over from SVG) how the baseline is defined (e.g. [ideographic], [text-bottom], [text-top]) relative to other text dominant-baseline determine or re-determine a scaled-baseline-table; in that sense it defines which baseline mostly applies hyphenate-character character used at the end of a line before a hyphenation break, [auto] or some Unicode character hyphenate-limit-chars specifies the minimum word length to allow hyphenation of words as well as the minimum number of characters before and after the hyphen; two numbers or [auto] respectively hyphens defines whether line breaks shall be hyphenated. [none], [manual], or [auto]? line-break how to break lines of CJK text when working with punctuation and symbols; [auto], [anywhere], [normal], or [loose]? line-height sets the height of a line box in horizontal writing modes: line-height-step if content does not fit into the given line-height, compute the closest next multiple of this value and use it as line-height text-align alignment of a text block text-align-last alignment of the last line text-indent indentation of a paragraph text-justify justification if text-align:justify is set. [inter-word], [inter-character], [distribute], … text-wrap line breaking (=wrapping), [wrap], [nowrap], [balance], [pretty], or [stable]? text-wrap-mode shall text be wrapped? yes [wrap] or no [nowrap]. text-wrap-style how shall text be wrapped? [auto], [balance], [pretty], or [stable]? paragraph level / block-level elements: break-after is it ok to introduce a page/column/region break after this element? yes [all] or no [avoid] or other keywords depending on page/column/region context and whether it is the [left] or [right] printed page or [recto] or [verso] break-before same as break-after but "before this element?" break-inside page, column, or region breaks inside element? [auto], [avoid], [avoid-page], [avoid-column], [avoid-region], [inherit], [initial], [revert], … direction [ltr] or [rtl] (should be set through HTML dir attribute instead!) line-clamp allows limiting of the contents of a block to the specified number of lines: some integer text-orientation if writing-mode:horizontal-tb is NOT set, place characters [upright] or 90° downwards? text-overflow text overflows box. how to handle? [clipped] to cut off in middle of glyph, show an [ellipsis] …, or display a custom string vertical-align sets vertical alignment of an inline, inline-block or table-cell box: [baseline], [top], [middle], [buttom], [sub], [text-top] writing-mode sets whether lines of text progress horizontally or vertically as well as the direction in which blocks progress: [horizontal-tb], [vertical-rl], [vertical-lr], [sideways-rl], [sideways-lr]? page level: orphans minimum number of lines in a block container that must be shown at the bottom of a page, region, or column page specify the named page, a specific type of page defined by the @page at-rule: some string text-size-adjust mobile device render for large viewports, inflate text, and map to small viewport. text-size-adjust:none turns text inflation off (recommended for responsive websites) widows sets the minimum number of lines in a block container that must be shown at the top of a page, region, or column: some Webdevelopment notes ==================== .. contents:: This page lists framework, tips and notes helpful in web development. Tips and tricks --------------- * `CSS animated loaders `__ by Ana Todur * `CSS animation: “Floating Cloud Background” `__ * `Resilient web design `__: recites the history of the web and how to approach elements like languages * `“You might not need jQuery” `__ * `“how to manage HTML DOM with vanilla JavaScript only?” `__ * `flexbox guide `__, `grid guide `__ * `slides of a web engine developer about Javascript optimization and Unicode handling `__ * `“7 Principles of Icon Design: Clarity, Readability, Alignment, Brevity, Consistency, Personality, Ease of Use.” `__ * `Media queries `__ Accessibility ~~~~~~~~~~~~~ * `“accessibility checker” `__ * Tool by WebAIM: https://wave.webaim.org/report * https://benjaminwand.github.io/Web-accessibility_101/ * C3 Inclusion Operation Center * https://c3ioc.de/ * https://c3ioc.de/speakersdesk.html#english * https://c3ioc.de/about.html#english Wordpress related ~~~~~~~~~~~~~~~~~ * https://github.com/SchumacherFM/wordpress-to-hugo-exporter HTTP operation notes ~~~~~~~~~~~~~~~~~~~~ CREATE "submit data objects for archive" GET "retrieve archived data objects" DELETE "delete archived data objects" "Following submission, the service must provide an identifier that can be used to retrieve the archived data and/or associated evidence." "Submission, retrieval, query state, and deletion of archived data objects are necessary basic functions of a long-term archive service." "A long-term archive service must be capable of providing evidence that can be used to demonstrate the integrity of data for which it is responsible, from the time it received the data until the expiration of the archival period of the data." "Data is the principal asset protected by a long-term archive service. The principle threat that must be addressed by a long-term archive service is an undetected loss of data integrity." Tools ----- Tools for frontend development: * `A privacy-friendly drop-in replacement for Google Fonts `__ * `PageSpeed Insights `__ Tools for backend development: * https://httpbingo.org/ * https://github.com/postmanlabs/httpbin * `“Free IP Geolocation API” `__ * `“What is ngrok? Ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels” `__ Tools for creators: * `Create neat source code screenshots for microblogging `__ Content to reuse ---------------- Photography, stock photos and high-res images: * `“Free, high resolution images.” `__ * `“Biodiversity Heritage Library” `__ * `“Lizenzfreie Stockfotos, Vektorbilder, Videos und Musik” `__ * `top wallpapers at wallhaven `__ * `The internet’s source of freely-usable images. `__ Icon sets: * `Iconfinder `__ * `“The noun project: Icons for everything” `__ * `Numix (cool icon sets) `__ * `Your Ultimate Icon Library `__ * `“beautifully crafted animated icons” `__ * `Heroicons `__ Patterns / Texture * `“Subtle Patterns” `__ * `Generated SVG background patterns `__ Color pallets: * `Color pallet `__ * `Sorted CSS colors `__ * `Accessible color palette generator `__ * `Palettes on colourlovers `__ Frontend frameworks: * `Tailwind CSS `__ * `Bootstrap: Build fast, responsive sites with Bootstrap `__ * `Bulma is a free, open source framework that provides ready-to-use frontend components that you can easily combine to build responsive web interfaces. `__ * `Sass is the most mature, stable, and powerful professional grade CSS extension language in the world. `__ * `Pure.css. A set of small, responsive CSS modules that you can use in every web project. `__ * `MVP.css. A minimalist stylesheet for HTML elements `__ * `It's CSS, with just a little more. `__ * `Blueprint is a CSS framework, which aims to cut down on your development time `__ * `Minimal CSS Framework for semantic HTML `__ * `Tufte CSS provides tools to style web articles using the ideas demonstrated by Edward Tufte’s books and handouts `__ Inspiration ----------- * `“isometric graphics library for HTML5 canvas” `__ design_inspiration ~~~~~~~~~~~~~~~~~~ General web design: * `curated.design: “Curated web design inspiration catalog” `__ (website itself has nice, rounded tiles) redirects to `craftwork.design `__ these days * `tao-digital.at: modern vertical layout with good balance between topic (left, e.g. “Der Nutzen”) and content (list items on the right) `__ * `sparkleshare.org: fresh icon design used on website `__ * `bright, white, fresh webblog design focused on images `__ * `designspiration.net: Images chosen by uniform color aligned in mansory layout `__ * `witheve.com: nice two-column design `__ * `golang.github.io: nice color choice (blue and black) for text versus links/headers `__ * `lesswrong: nice non-intrusive menu, nice blocks in main text, and beautiful background image with lines on the right `__ * `agencyinbiosphere.com: non-standard monospace-text design with neat color gradient lines to split sections apart `__ * `bohrn-mena.at: neat topic overview page `__ * `cruncher.ch: very cool left menu bar with colorful 3D logo and non-obstrusive menu as well as clear contrast between flow text and source code `__ Only one specific element: * `whopayswriters: nice logo `__ * `nice presentation of a book (metadata, plot, …) `__ Nice font choice: * nice header font: sorts-mill-goudy-1,sorts-mill-goudy-2,Muli,Helvetica,Arial,sans-serif * nice article reading font: Spectral * Martin Thür uses "Plus Jakarta Sans" as font `on his weblog `__ and it looks nice Unsorted (TODO to be sorted): * https://insect.sh/ * https://harmonia-game.com/ * https://www.redblobgames.com/pathfinding/a-star/introduction.html * https://gratisography.com/ * https://creativemarket.com/ * Speckyboy: https://speckyboy.com/category/typography/ * James Brocklehurst: https://www.behance.net/mightymeta * https://www.gwern.net/Self-decrypting-files * beautiful JS slides: http://progslides.github.io/ss18/tut2.html#8 * Vietnamese typography: https://vietnamesetypography.com/samples/ * balanced color selection: https://loopholelabs.io/ * nice code presentation: https://scale.sh/ Awesome pure-CSS & HTML projects ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * https://benjaminaster.com/css-minecraft/ * https://a.singlediv.com/ * https://lyra.horse/css-clicker/ * https://keithclark.co.uk/labs/css-3d-shadows/ * https://suricrasia.online/puzzlebox/