- Jan 2025
-
developer.mozilla.org developer.mozilla.org
-
Determine if the content of an element is overflowing
Overflow/scrollbar detection using modern CSS https://css-tip.com/overflow-detection/
-
-
raw.githack.com raw.githack.com
-
Positions the dropdownmenu below the togglebutton
Two alternative
css position:absolute bottom: 0; transform: translateY(100%);
css /* remove top, bottom simple position:absolute would suffice*/
-
On the absolutely positioned dropdown-menu, you used left: 0 to align its left sidewith the left side of the dropdown. Then you used top: 2.1em to place its top edgebeneath the label (with the padding and border, the label is about 2.1 em tall). A
Both are not necessary: absolute without specified value will cause element to appear at its normal flow positon without affecting other.
-
remove the word close from your markup and replaceit with an ×, but this would introduce an accessibility problem: a
best practice: use aria-label on the button
-
inset-inline: 20%
Percentage for fixed element refer the viewport
-
Its initial value is auto,
flex-basis initial value is auto, note short-hand empty set it 0%
-
- Dec 2024
-
raw.githack.com raw.githack.com
-
inline style
External <link><br /> Internal head > style<br /> inline <tag style="...">
-
a selector has more IDs,
It's actually possible. see Link
-
hree different types, or origins, of stylesheets
User-agent, User, author
-
- Jul 2024
-
dataxdesign.io dataxdesign.io
-
remain below
There's got to be some way to use
position:sticky
to keep it this particular thing thing, rather than the second one in the lower right, if you want.
Tags
Annotators
URL
-
-
dataxdesign.io dataxdesign.io
-
RandomTimeline
Probably want the z-index higher on the buttons here than the shuffled cards?
-
- Feb 2024
-
www.11ty.dev www.11ty.dev
-
This tip works well on small sites that don’t have a lot of CSS. Inlining your CSS removes an external request from your critical path and speeds up page rendering times! If your CSS file is small enough, this is a simplification/end-around for Critical CSS approaches
Tags
Annotators
URL
-
-
course.oc-static.com course.oc-static.com
-
word-wrap
Cette propriété n'est plus présente dans la documentation fournie par Mozilla, elle a été remplacée par la propriété
overflow-wrap
dont elle partage les même valeurs. Bien que son remplacement soit effectif, sa syntaxe reste tout de même acceptée par le CSS Working Group à des fins de rétrocompatibilité.
-
- Jan 2024
-
web.hypothes.is web.hypothes.is
-
The author's byline is styled like a link but is just text.
-
- Dec 2023
-
www.joshwcomeau.com www.joshwcomeau.com
-
I think this is one of those situations where it's easy to confuse “familiar” with “simple”. You're probably much more comfortable with min-width than flex-shrink, but that doesn't mean flex-shrink is more complicated!
-
- Nov 2023
-
-
✅ We can actually use a neat trick which basically consists in making a CSS grid with a single grid item. All we really have to do then, is taking our grid-template-rows and make it transition from 0fr to 1fr: this way, our grid item will transition from 0 to its "natural" height. It's THAT simple:
```css .accordion - body { display: grid; grid - template - rows: 0 fr; transition: 250 ms grid - template - rows ease; }
.accordion: hover.accordion - body { grid - template - rows: 1 fr; }
.accordion - body>div { overflow: hidden; } ```
-
-
www.theodinproject.com www.theodinproject.com
-
In addition to that issue, too many new developers also jump into learning frameworks too early in their education; the prospect of not having to practice writing vanilla CSS is very tempting. As a result, many developers do not get enough CSS practice under their belts to solidify the fundamentals of this very important language.
-
-
css-tricks.com css-tricks.com
-
I’m sure you can imagine, the ability to shift an element around based on its regular position is pretty useful. I find myself using this to line up form elements many times that have a tendency to not want to line up how I want them to.
-
-
www.theodinproject.com www.theodinproject.com
-
The default positioning mode that you’ve gotten used to is position: static.
-
-
learn.shayhowe.com learn.shayhowe.com
-
Esta página es un tutorial a todos los tipos de selectors y pseudo-selectors que ofrece CSS3.
-
-
cssbattle.dev cssbattle.dev
-
Welcome to CSSBattleThe funnest multiplayer game with 300K+ web designers & developers. Replicate the target images using CSS - the shorter your code, the higher your score! Happy coding!
https://cssbattle.dev/
-
-
gregorlove.com gregorlove.com
-
css-tricks.com css-tricks.com
-
It’s become very popular to use viewport units for responsive typography – establishing font-sizes that grow and shrink depending on the current viewport size. Using simple viewport units for font-size has an interesting (dangerous) effect. As you can see, fonts scale very quickly – adjusting from unreadably small to extra large in a very small range.
No es conveniente utilizar viewport units para tipografía, ya que genera un efecto escala distorcionado.
Para evitar este efecto y seguir utilizando viewport units, debes primero colocar una unidad absoluta base (e.g. 16px) y luego utilizar una función como
calc
para multiplicarlos. Téngase por ejemplo:calc(16px + 0.5vw)
.
-
-
Tags
Annotators
URL
-
-
codyloyd.com codyloyd.com
-
So to reiterate my conclusion: I definitely prefer using relative units to define font-size so that you can respect the user’s settings, but I don’t personally think it’s a big deal if your layout is complex enough that you cannot support it. If you’re using rem for fonts, then I slightly prefer using pixels for elements such as margin and padding, but there is nothing wrong with using rem for that, if you prefer that scaling effect.
Utilizar
rem
en elementos comomargin
andpadding
produce un efecto escala similar al zoom. Si no quieres que las cosas se agranden mucho, sino solo lo necesario, es mejor utilizarpx
.
-
-
meyerweb.com meyerweb.com
-
I don't particularly recommend that you just use this in its unaltered state in your own projects. It should be tweaked, edited, extended, and otherwise tuned to match your specific reset baseline.
Aún cuando se trata de un reseteo completo de estilo CSS, proponentes de este método como es the Meyer's Reset recomiendan sobreescribir partes del reseteo con las preferencias personales del diseñador. Esto quiere decir que un reseteo no debe ser un reseteo en blanco, sino un reseteo hacia el estándar o base que el diseñador prefiera.
Tags
Annotators
URL
-
-
www.theodinproject.com www.theodinproject.com
-
To counter this, many developers start their projects with a “CSS Reset”; a file that undoes browser defaults, so that every element behaves the same in every browser.
Para lidear de manera fulminante con las diferencias entre los navegadores con respecto al estilo, los diseñadores aplican un CSS Reset, lo cual elimina cualquier personalización que esté por defecto. Esta solución es radical y no estrictamente necesaria, ya que el diseñador tendra que reescribir muchas de las configuraciones que han sido borradas.
-
The problem with this is that there is no guarantee that different browsers will style everything the same. In general, inconsistencies are going to be pretty minor, but they DO exist.
Aunque existen diversas similitudes, todos los navegadores tienen defaults distintos respecto del CSS de los principales elementos HTML. Esto es algo a tener en cuenta al momento de tratar de dar una experiencia uniforme al usuario porque vas a tener que sobreescribir las diferencias entre navegadores y establecer tu propio estándar.
-
-
pencilandpaper.io pencilandpaper.io
-
Hay una serie de buenas prácticas en la fabricación de tablas que permiten una interacción más eficiente entre el usuario y la data que se busca comunicar. Una buena experiencia entre el usuario y las tablas dentro de una página web dependen en suma del diseño establecido. La fabricación de buenas tablas en la web solo requieren de conocimientos de HTML y CSS.
-
-
alan.norbauer.com alan.norbauer.com
Tags
Annotators
URL
-
-
gitlab.com gitlab.com
-
It was an intentional decision to make the items in the dropdown of content editor span two lines instead of one. The reason being that sometimes the text can get too long and the dropdown spans the entire width of page which isn't ideal. Also, a slimmer dropdown looks better on mobile devices.
Tags
Annotators
URL
-
- Oct 2023
-
developer.chrome.com developer.chrome.com
-
developer.chrome.com developer.chrome.com
Tags
Annotators
URL
-
-
-
developer.mozilla.org developer.mozilla.org
-
-
```css :root { color-scheme: light dark; }
body { background: light-dark(#333, #ccc); } ```
-
- Sep 2023
-
hachyderm.io hachyderm.io
Tags
Annotators
URL
-
- Aug 2023
-
svelte.dev svelte.dev
Tags
Annotators
URL
-
-
www.youtube.com www.youtube.com
-
-
Tags
Annotators
URL
-
-
web-platform-tests.org web-platform-tests.org
Tags
Annotators
URL
-
-
cheatsheetseries.owasp.org cheatsheetseries.owasp.org
-
stackoverflow.com stackoverflow.com
-
-
```html
<body style="visibility: hidden;"> <script>0</script> </body> <noscript> <style>body { visibility: visible; }</style> </noscript>```
-
- Jul 2023
-
gist.github.com gist.github.com
-
stackoverflow.com stackoverflow.com
-
developer.chrome.com developer.chrome.com
-
firefox-source-docs.mozilla.org firefox-source-docs.mozilla.org
- Jun 2023
-
css-tricks.com css-tricks.com
-
ishadeed.com ishadeed.com
Tags
Annotators
URL
-
-
postcss.org postcss.org
Tags
Annotators
URL
-
- May 2023
-
developer.mozilla.org developer.mozilla.org
-
developer.mozilla.org developer.mozilla.org
- Apr 2023
-
developer.mozilla.org developer.mozilla.org
Tags
Annotators
URL
-
-
developer.mozilla.org developer.mozilla.org
-
developer.mozilla.org developer.mozilla.org
-
developer.mozilla.org developer.mozilla.org
-
x.st x.st
Tags
Annotators
URL
-
- Mar 2023
-
www.w3.org www.w3.org
Tags
Annotators
URL
-
-
web.dev web.dev
Tags
Annotators
URL
-
-
-
developer.mozilla.org developer.mozilla.org
-
vanilla-extract.style vanilla-extract.style
-
-
css-tricks.com css-tricks.com
Tags
Annotators
URL
-
-
drafts.csswg.org drafts.csswg.org
-
-
www.w3.org www.w3.org
-
-
www.mattstobbs.com www.mattstobbs.com
Tags
Annotators
URL
-
-
developer.mozilla.org developer.mozilla.org
-
developer.mozilla.org developer.mozilla.org
-
developer.mozilla.org developer.mozilla.org
-
CSS-generated content is not included in the DOM. Because of this, it will not be represented in the accessibility tree and certain assistive technology/browser combinations will not announce it. If the content conveys information that is critical to understanding the page's purpose, it is better to include it in the main document.
-
```abnf content = normal | none | [ <content-replacement> | <content-list> ] [ / [ <string> | <counter> ]+ ]? | element( )
<content-replacement> = <image>
<content-list> = [ <string> | contents | <image> | <counter> | <quote> | <target> | <leader()> ]+
<counter> = <counter()> | <counters()>
<image> = <url> | <gradient>
<quote> = open-quote | close-quote | no-open-quote | no-close-quote
<target> = <target-counter()> | <target-counters()> | <target-text()>
<leader()> = leader( <leader-type> )
<counter()> = counter( <counter-name> , <counter-style>? )
<counters()> = counters( <counter-name> , <string> , <counter-style>? )
<url> = url( <string> <url-modifier> ) | src( <string> <url-modifier> )
<target-counter()> = target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )
<target-counters()> = target-counters( [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )
<target-text()> = target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )
<leader-type> = dotted | solid | space | <string>
<counter-style> = <counter-style-name> | <symbols()>
<symbols()> = symbols( <symbols-type>? [ <string> | <image> ]+ )
<symbols-type> = cyclic | numeric | alphabetic | symbolic | fixed <br /> ```
-
-
tailwindcss.com tailwindcss.com
-
```html
<div data-size="large" class="data-[size=large]:p-8"> </div> <div data-size="medium" class="data-[size=large]:p-8"> </div> <style> .data-\[size\=large\]\:p-8[data-size="large"] { padding: 2rem; } </style>```
-
-
-
developer.mozilla.org developer.mozilla.org
-
developer.mozilla.org developer.mozilla.org
-
abnf object-fit = fill | contain | cover | none | scale-down
-
-
developer.mozilla.org developer.mozilla.org
-
```abnf object-position = <position>
<position> = [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ]
<length-percentage> = <length> | <percentage> ```
-
-
developer.mozilla.org developer.mozilla.org
-
css-tricks.com css-tricks.com
Tags
Annotators
URL
-
-
developer.mozilla.org developer.mozilla.org
-
Tags
Annotators
URL
-
-
css-tricks.com css-tricks.com
-
developer.mozilla.org developer.mozilla.org
- Feb 2023
-
developer.chrome.com developer.chrome.com
Tags
Annotators
URL
-
-
patrickbrosset.medium.com patrickbrosset.medium.com
-
storybook.js.org storybook.js.org
Tags
Annotators
URL
-
- Jan 2023
-
-
semicolon.dev semicolon.dev
Tags
Annotators
URL
-
-
iamkate.com iamkate.com
Tags
Annotators
URL
-
-
garden.bradwoods.io garden.bradwoods.io
-
github.com github.com
-
https://github.com/CondeNast/atjson
They're using annotations in this context more like CSS, but instead of adding the markup into the content as is done in HTML and processing it, they've physically separated the text and the markup entirely and are using location within the text to indicate where the formatting should take place.
-
- Dec 2022
-
www.w3.org www.w3.org
Tags
Annotators
URL
-
-
hicks.design hicks.design
-
barryfrost.com barryfrost.com
-
Tailwind CSS has utility classes for height using the pattern h-x where x is a number, for example h-4 which maps to a height of 16px. Microformats 2 (MF2) also uses the h- class prefix for top-level objects like h-entry. When a MF2 parser encounters the Tailwind height classes it will incorrectly assume a new h- object has been defined.
-
-
blog.logrocket.com blog.logrocket.com
Tags
Annotators
URL
-
-
www.zhangxinxu.com www.zhangxinxu.com
-
从今天开始,请叫我Node文本节点处理大师
-
-
www.zhihu.com www.zhihu.com
-
有哪些CSS标准是前端工程师很有必要研读的?
-
-
www.zhihu.com www.zhihu.com
-
怎么进一步提高 HTML 和 CSS 的能力?
-
-
www.zhihu.com www.zhihu.com
-
CSS sprite 对性能究竟有多大影响?
-
-
www.zhihu.com www.zhihu.com
-
line-height:normal是怎样计算的?
-
-
www.zhihu.com www.zhihu.com
-
css样式的百分比都相对于谁?
-
-
www.zhihu.com www.zhihu.com