# Clippath, cells (and closures ?)

**URL:** <https://talk.observablehq.com/t/clippath-cells-and-closures/5962>\
**Category:** Help\
**Created:** [December 16, 2021, 4:37pm UTC](https://talk.observablehq.com/t/clippath-cells-and-closures/5962 "2021-12-16T16:37:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neocarto](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/neocarto/32/6554_2.png) [@neocarto](https://talk.observablehq.com/u/neocarto)\
**Post date:** [December 16, 2021, 4:37pm UTC](https://talk.observablehq.com/t/clippath-cells-and-closures/5962/1 "2021-12-16T16:37:28Z")

</div>

I have a question that is bothering me… In [this notebook](https://observablehq.com/d/20a896150d4239ae), I have created 2 maps in 2 different cells with 2 different projections. In these 2 maps, use a clip path to cut the countries by the outline. In both cases, the id of my clip path is “clip”. But in the 2nd map, it is not the right clip that is used, but the one from the 1st map. Why? Is it because of Observable or is it linked to javascript? Of course, we could solve the problem by changing the id of the 2nd clip. But why? What if I want the same id for both maps ? If someone can explain this to me, it would be very nice 🙂

> **[Clip closure ?](https://observablehq.com/d/20a896150d4239ae)**

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [December 16, 2021, 4:44pm UTC](https://talk.observablehq.com/t/clippath-cells-and-closures/5962/2 "2021-12-16T16:44:30Z")

</div>

ids are unique in a page; a solution might be to use a shadow root (a sort of “closure” in the DOM) : [Hello, shadow DOM / Fil / Observable](https://observablehq.com/@fil/hello-shadow-dom)

---

<div class="post-metadata">

**Author:** ![neocarto](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/neocarto/32/6554_2.png) [@neocarto](https://talk.observablehq.com/u/neocarto)\
**Post date:** [December 16, 2021, 5:50pm UTC](https://talk.observablehq.com/t/clippath-cells-and-closures/5962/3 "2021-12-16T17:50:25Z")

</div>

Ok. Thx Fil.
