Skip to content

Commit

Permalink
Merge branch 'main' into winging-it-live-oddcontrast
Browse files Browse the repository at this point in the history
* main:
  Apply suggestions from code review
  Update example, summary
  adjust docs
  review-v2
  review
  Edits
  Update date and version
  Remove broken links to AEA
  Bump @11ty/eleventy from 3.0.0-alpha.13 to 3.0.0-alpha.14
  Bump the npm-minor-upgrades group with 3 updates
  Automated webmentions update
  Add Anchor position update
  • Loading branch information
jgerigmeyer committed Jul 2, 2024
2 parents f6a2142 + 0cabaa4 commit 7cbb7aa
Show file tree
Hide file tree
Showing 14 changed files with 216 additions and 57 deletions.
2 changes: 1 addition & 1 deletion content/_data/webmentions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lastFetched": "2024-06-24T08:06:22.475Z",
"lastFetched": "2024-07-01T08:06:37.790Z",
"children": [
{
"type": "entry",
Expand Down
8 changes: 2 additions & 6 deletions content/blog/2017/design-using-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ summary: |
giving our community an easy way to learn on our own time
from anywhere in the world.
Our first video in this series is a talk by Sarah Parmenter titled
"Designing Using Data" given at [An Event Apart Orlando].
[An Event Apart Orlando]: https://aneventapart.com/event/orlando-2014
"Designing Using Data" given at An Event Apart Orlando.
---

{% import "embed.macros.njk" as embed %}
Expand All @@ -47,10 +45,8 @@ use both research and experience to create the best results.
) }}][video]

How do you use research to help you make design decisions? Let us know by
sending us a message via [Twitter]. For other great talks from An Event Apart
speakers, [visit their website].
sending us a message via [Twitter].

[Sarah Parmenter]: https://www.sazzy.co.uk/
[video]: https://vimeo.com/120804557
[Twitter]: https://twitter.com/oddbird
[visit their website]: https://aneventapart.com/
1 change: 1 addition & 0 deletions content/blog/2022/cascade-layers-polyfill.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags:
- CSS
- Cascade Layers
- CSSWG
- Polyfill
image:
src: blog/2022/postcss-cascade-layers-polyfill.png
alt: |
Expand Down
2 changes: 1 addition & 1 deletion content/blog/2022/platform-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ authors and the underlying language.

Last month,
I spoke about `@layer` for
[An Event Apart Denver](https://aneventapart.com/event/denver-2022).
An Event Apart Denver.
During the Q&A session after my talk,
someone asked,
"How can I use this with CSS-in-JS tools?"
Expand Down
1 change: 1 addition & 0 deletions content/blog/2023/web-platform-tests-polyfills.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- GitHub
- JavaScript
- Testing
- Polyfill
image:
src: blog/2023/graph.jpg
summary: |
Expand Down
149 changes: 149 additions & 0 deletions content/blog/2024/anchor-position-polyfill.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
title: Updates to the Anchor Position Polyfill
sub: Catching up to the spec
date: 2024-07-02
image:
src: blog/2024/anchor1.jpg
alt: >
A rusty anchor hanging with the sea in the background.
author: james
sponsors: true
tags:
- Article
- OSS
- Anchor Position
- CSS
- Polyfill
summary: |
Our sponsors are supporting the continued development of the
CSS Anchor Positioning Polyfill.
Here's a summary of the latest updates.
---

A few years ago, OddBird started working on a polyfill for [CSS Anchor
Positioning] as the spec started to take form. Now that the spec has stabilized
and Chromium has begun implementation, we are relying on our sponsors to support
development of the polyfill. Thanks to their contributions, we're releasing
[v0.1.0].

[CSS Anchor Positioning]: https://drafts.csswg.org/css-anchor-position/
[v0.1.0]: https://github.com/oddbird/css-anchor-positioning/releases/tag/v0.1.0

## Updates in v0.1.0

1. `position-anchor`

In their full form, anchor functions can be quite verbose and repetitive.

```css
#target {
top: anchor(--my-anchor bottom);
width: anchor-size(--my-anchor width);
}
```

[`position-anchor`] allows you to specify a default anchor for an element.

[`position-anchor`]: https://drafts.csswg.org/css-anchor-position/#position-anchor

```css
#target {
position-anchor: --my-anchor;
top: anchor(bottom);
width: anchor-size(width);
}
```

You can also use this to share positioning rules while using different anchors.
Both Target A and Target B will be positioned to the right of their anchor, but
they will use different respective anchors.

```css
.target {
left: anchor(right);
}
.target#a {
position-anchor: --anchor-a;
}
.target#b {
position-anchor: --anchor-b;
}
```

`position-anchor` will also be useful for things like [`inset-area`], which
isn't yet supported by the polyfill.

[`inset-area`]: https://drafts.csswg.org/css-anchor-position/#inset-area

2. Anchor validity

Thanks to a great contribution from [@ayoreis], the validity algorithm has been
updated to match the [spec]. More can be found in the [issue], but this change
makes more elements available for anchoring. Notably, you can now anchor to
another element that is anchored as well (as long as the anchor element is layed
out before the target element).

[@ayoreis]: https://github.com/ayoreis
[spec]: https://drafts.csswg.org/css-anchor-position/#target
[issue]: https://github.com/oddbird/css-anchor-positioning/issues/103

3. Support multiple names in [`anchor-name`].

[`anchor-name`]: https://drafts.csswg.org/css-anchor-position/#name

In this example, both `#target-a` and `#target-b` are referring to the same
element, but with different names.

```css
.anchor {
anchor-name: --a, --b;
}
#target-a {
position-anchor: --a;
}
#target-b {
position-anchor: --b;
}
```

This will enable a number of use cases where a target can be anchored to
different anchors, depending on what is available. Perhaps some of your pages
have a different layout, where you want `#target-b` to anchor to a
`#side-anchor` if there is one, but otherwise to the default `.anchor`.

```css
.anchor#side-anchor {
anchor-name: --b;
}
```

## What's next?

While a lot of the basic functionality is already possible with the polyfill,
there's a lot left to do to bring the polyfill up to date with the spec. Our
[v1.0.0 Milestone] is prioritized based on what we think will be the most
impactful and useful features, and some of the upcoming ones are:

[v1.0.0 Milestone]: https://github.com/oddbird/css-anchor-positioning/milestone/1

- [#91] Applying the polyfill to dynamic elements
- [#167] Position Fallback
- [#180] `anchor-scope`
- [#181] Support for `inset-area`

[#91]: https://github.com/oddbird/css-anchor-positioning/issues/91
[#167]: https://github.com/oddbird/css-anchor-positioning/issues/167
[#180]: https://github.com/oddbird/css-anchor-positioning/issues/180
[#181]: https://github.com/oddbird/css-anchor-positioning/issues/181

If you're as excited as I am to use these features, there are a few ways you can
help. First, let us know which features you're most eager to see supported by
commenting on the GitHub issues. We also welcome PRs.

And of course, [sponsoring] OddBird's Open Source work is a great way to help
make our continued work on this polyfill (and others) possible. We're grateful
for our existing sponsors who have made this release possible, and you can see
them [below].

[sponsoring]: https://opencollective.com/oddbird-open-source
[below]: #open-source-sponsors
12 changes: 5 additions & 7 deletions content/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ and help along the way.
- Intern compensation
is determined on a case-by-case basis.

### PTO

All contractors are encouraged to take
10 days of PTO annually,
paid at \$400/day.

### Transparency

Our books are open to the team,
Expand All @@ -87,7 +81,7 @@ at a level sufficient to keep the team working
on internal projects for up to three months
without client work.

### Education & Technology
### Education, Technology, & PTO

OddBird provides \$1000 a year
towards continuing education related to your work —
Expand All @@ -99,6 +93,10 @@ that contribute to your daily work.
If unused in a year, this money rolls over
to subsequent years.

All contractors are encouraged to take
10 days of PTO annually,
currently paid at \$400/day.

These benefits are available
after you’ve been working with OddBird
for at least six months.
Expand Down
1 change: 0 additions & 1 deletion content/talks/beyond-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ tags:
slides: https://slides.oddbird.net/variables/
events:
- venue: An Event Apart Spring Summit
url: https://aneventapart.com/event/spring-summit-2021
date: 2021-04-19
end: 2021-04-21
adr: Online
Expand Down
2 changes: 0 additions & 2 deletions content/talks/cascading-layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ tags:
slides: https://slides.oddbird.net/layers/
events:
- venue: An Event Apart
url: https://aneventapart.com/event/san-francisco-2022
adr: San Francisco, CA
date: 2022-12-12
end: 2022-12-14
slides: https://slides.oddbird.net/layers/aea-sf22/
- venue: An Event Apart
url: https://aneventapart.com/event/denver-2022
adr: Denver, CO
date: 2022-10-10
end: 2022-10-12
Expand Down
1 change: 0 additions & 1 deletion content/talks/css-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ tags:
slides: https://slides.oddbird.net/conventions/
events:
- venue: An Event Apart Fall Summit
url: https://aneventapart.com/event/online-1020
date: 2020-10-26
end: 2020-10-28
adr: Online
Expand Down
1 change: 0 additions & 1 deletion content/talks/intrinsic-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ events:
media: &smash
youtube: QL3tFZLgVxU
- venue: An Event Apart Fall Summit
url: https://aneventapart.com/event/fall-summit-2021
date: 2021-10-11
end: 2021-10-13
adr: Online
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"webmentions": "node scripts/fetch-webmentions.js",
"prod": "yarn build",
"checklinks:internal": "npx --yes --package=hyperlink --package=tap-spot -- 'hyperlink --canonicalroot https://www.oddbird.net/ --root _site/ -r -p -i --skip \".css.map\" --skip \".js.map\" --skip \"feed.atom\" --skip \"/docs/\" _site/index.html | tap-spot'",
"checklinks:external": "npx --yes --package=broken-link-checker -- 'blc -ro --exclude=localhost:8080 --exclude=stackoverflow.com --exclude=codepen.io --exclude=linkedin.com --exclude=projects.invisionapp.com --exclude=docs.github.com --exclude=www.sass.hk --exclude=www.drupal.org --exclude=www.canva.com --exclude=www.fastcompany.com --exclude=duabuset-tandem.com --exclude=puta-elementa.com --exclude=campaignzero.org --exclude=twitter.com --exclude=player.vimeo.com --exclude=slideshare.net https://www.oddbird.net'",
"checklinks:external": "npx --yes --package=broken-link-checker -- 'blc -ro --exclude=localhost:8080 --exclude=stackoverflow.com --exclude=codepen.io --exclude=linkedin.com --exclude=projects.invisionapp.com --exclude=docs.github.com --exclude=www.sass.hk --exclude=www.drupal.org --exclude=www.canva.com --exclude=www.fastcompany.com --exclude=duabuset-tandem.com --exclude=puta-elementa.com --exclude=campaignzero.org --exclude=twitter.com --exclude=vimeo.com --exclude=slideshare.net https://www.oddbird.net'",
"checklinks": "run-s checklinks:internal checklinks:external"
},
"imports": {
Expand All @@ -56,7 +56,7 @@
"cssremedy": "^0.1.0-beta.2"
},
"devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.13",
"@11ty/eleventy": "3.0.0-alpha.14",
"@11ty/eleventy-fetch": "^4.0.1",
"@11ty/eleventy-img": "^4.0.2",
"@11ty/eleventy-plugin-rss": "^2.0.1",
Expand All @@ -78,12 +78,12 @@
"date-fns-tz": "^3.1.3",
"dotenv": "^16.4.5",
"doxray": "^0.10.1",
"eslint": "^9.5.0",
"eslint": "^9.6.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"fs-extra": "^11.2.0",
"globals": "^15.6.0",
"globals": "^15.7.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"js-yaml": "^4.1.0",
Expand All @@ -97,7 +97,7 @@
"netlify-plugin-11ty": "^1.4.0",
"node-fetch": "^3.3.2",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.38",
"postcss": "^8.4.39",
"posthtml": "^0.16.6",
"prettier": "^3.3.2",
"rimraf": "^5.0.7",
Expand Down
Binary file added src/images/blog/2024/anchor1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7cbb7aa

Please sign in to comment.