# Plot text mark style

**URL:** <https://talk.observablehq.com/t/plot-text-mark-style/7514>\
**Category:** Help\
**Created:** [January 13, 2023, 10:08am UTC](https://talk.observablehq.com/t/plot-text-mark-style/7514 "2023-01-13T10:08:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jchrist](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jchrist](https://talk.observablehq.com/u/jchrist)\
**Post date:** [January 13, 2023, 10:08am UTC](https://talk.observablehq.com/t/plot-text-mark-style/7514/1 "2023-01-13T10:08:05Z")

</div>

I want to style all text elements in a plot equally via css:

```auto
text {
      font-size: 12px;
      line-height: 125%;
      font-weight: 400;
      font-family: InterRegular
}

```

but also want to make exceptions and style text marks differently:

```auto
    Plot.text(inftime_produkt, Plot.selectLast({ 
      x: "date",
      y: max_inflation_round,
      z: "produkt",
      text: (d) => `${d.produkt.split(' ')[0]}: ${(d.inflation-100).toLocaleString("de", {minimumFractionDigits: 1, maximumFractionDigits: 1})}%`,
      fill: "#e84f1c",
      textAnchor: "end",
      fontSize: "24px",
      lineHeight: "150%",
      fontWeight: 600,
      fontFamily: "InterRegular"
    }))

```

But these stylings are overwritten by css. How can I do this?

this is my notebook: [Inflation Dashboard Test / RND | Observable](https://observablehq.com/@rnd/inflation-dashboard-test)

---

<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:** [January 13, 2023, 11:07am UTC](https://talk.observablehq.com/t/plot-text-mark-style/7514/2 "2023-01-13T11:07:58Z")

</div>

in your css try changing `text` by `g:not([font-family]) text`

---

<div class="post-metadata">

**Author:** ![jchrist](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jchrist](https://talk.observablehq.com/u/jchrist)\
**Post date:** [January 13, 2023, 12:02pm UTC](https://talk.observablehq.com/t/plot-text-mark-style/7514/3 "2023-01-13T12:02:05Z")

</div>

very nice, thank you!
