350 private links
aspect-ratio can have two types of values:
3 / 2: a ratio of 3 in width and 2 in height3: a simple number where the width and height are equal
Old tricks to build web pages when CSS wasn't so much developed
Pinia is the nest version of Vuex for Vue 3 and this tool looks promising ! The current documentation is up-to-date.
How to program a dark theme for a website. It is easier than expected with @media (prefers-color-scheme: dark) and css variables !
Un projet dédié à été crée afin de monitorer le CI de plusieurs projets: https://github.com/mvisonneau/gitlab-ci-pipelines-exporter
Le reste de l'article explique comment faire :)
- Using vue props to congru accessibility, such as headline elements
- Use component reusability to make an accessibility feature once: a raw aria-live, vue announcer, and read more on the WAI-ARIA Authoring Practices https://github.com/w3c/aria-practices/issues
-View And Help Vue’s Accessibility Initiatives Grow and references are in the post- Learn From React Accessibility Leads
- Vue’s $refs Are Great For Focus Management
Critiquer Rust sous prétexte que c’est un langage complexe conduit à passer à côté de ce qui fait sa force : il est pensé pour être expressif, ce qui signifie qu’il y a beaucoup de fonctionnalités, et dans la majorité des cas c’est ce que vous attendez d’un langage de programmation.
L'article est bien complet !
Mon avis: utiliser Go pour le code qui doit être déployé demain, Rust pour le code qui devra rester en production tel quel pour les 5 prochaines années
—Grzegorz Nosek
From brute-force to optimized algorithm
Problems with deepcloning with JSON.stringify() / JSON.parse():
- Recursive data structures: JSON.stringify() will throw when you give it a recursive data structure. This can happen quite easily when working with linked lists or trees.
- Built-in types: JSON.stringify() will throw if the value contains other JS built-ins like Map, Set, Date, RegExp or ArrayBuffer.
- Functions: JSON.stringify() will quietly discard functions.
The solution: the function structuredClone.
Les arguments relevés semblent pertinent:
- les tests passent avant le typage → ok mais pourquoi ne pas avoir les deux et laisser ce choix par projet ?
- la lisibilité des en-têtes de fonction peuvent très bien être améliorée
- les annotations requirent leurs propres imports, ce qui peut conduire à des imports circulaires (cf: https://stackoverflow.com/questions/22187279/python-circular-importing/22187343#22187343)
A way to render conditionally the attributes of a tag.
Creating an object and setting the attributes as prop of the object if they should be rendered. Then use the spread operator on it:
<script>
export let value = "";
export let id = "";
export let placeholder = "";
export let type = "text";
let conditionalAttributes = {};
if (id) conditionalAttributes.id = id;
if (placeholder) conditionalAttributes.placeholder = placeholder;
if (type) conditionalAttributes.type = type;
</script>
<input {...conditionalAttributes} bind:value={value} />Now I understand how it is useful 👍
Easy to use. It could be useful :)
So you can write and store your own recipes.
A codesandbox or codepen like-service. The older one.
FYI it was created by Joel Spolsky.
Solution: Using 1 subgrid per element inside a grid.
In the console: $0.offsetParent → $0 is the currently set element.
Then we can use the offsetParent object property to find the closest ancestor to that element that has its position set to something other than static.
Solutions:
-
styling it manually through CSS :
input:focus { outline: 2px solid deeppink; } -
A keyup tab event listener. Think about adding the class through JS, that way the focus will still be accessible if JS fails to load.
-
the property
::focus-visible
The background color of checkboxes will be the one determined by accent-color. Nice !
And the surrounding stays accessible whatever this color is as the webbrowsers have their own implementation of this.