# כיצד לשנות את הטקסט של אובייקט span זה ללא בוררים?

**URL:** https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016
**Category:** Development
**Created:** [18 ביולי,‏ 2023,‏ 7:46pm UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016 "2023-07-18T19:46:52Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [18 ביולי,‏ 2023,‏ 7:46pm UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016/1 "2023-07-18T19:46:53Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/4/b/9/4b9e134147f302cc8c29e58ab020ffa581ac463a.png)

This object has the following HTML:

```plaintext
<span>Topic</span>

```

I’m wondering how one might use css to change this text to something else, e.g. “Blogs”.

EDIT: I would want to do this on a per-category basis.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [18 ביולי,‏ 2023,‏ 8:15pm UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016/2 "2023-07-18T20:15:19Z")

</div>

This is customisable via `/admin/customize/site_texts?q=Topics`

I’m not sure exactly _which_ one it is though…

You can figure it out by running `I18n.enableVerboseLocalizationSession()` in the JS console, reloading the page, then you’ll be able to correlate the number of the string with output in the console:

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/3/d/63da011140502dabdff10173c2fc9bbfb4094727.png)

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [18 ביולי,‏ 2023,‏ 8:16pm UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016/3 "2023-07-18T20:16:07Z")

</div>

This would be for all categories though, right? I want to do it _per_ category.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [19 ביולי,‏ 2023,‏ 5:30am UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016/4 "2023-07-19T05:30:16Z")

</div>

Hello 👋

This is possible with CSS.

```scss
body.category-name {
  .topic-list-header {
    .default.topic-list-data {
      span {
        visibility: hidden;
        &:before {
          content: "Blogs";
          visibility: visible;
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [19 ביולי,‏ 2023,‏ 5:40am UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016/5 "2023-07-19T05:40:48Z")

</div>

I wish I could give you 10 likes! Thank you so much, Don!

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [19 ביולי,‏ 2023,‏ 7:53am UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016/6 "2023-07-19T07:53:02Z")

</div>

> [@jordan-violet](#):
>
> on a per-category basis.

If you want to do this on multiple categories and avoid having many SCSS lines, you can use SCSS loops. It makes the code easier to read and maintain because you’ll just have to edit two SCSS variables.

> [@How to add unique text below each category image?](https://meta.discourse.org/t/how-to-add-unique-text-below-each-category-image/265792/6):
>
> Oh, I see. slight_smile You can still use a pure SCSS solution using category slugs: information_source If you want to add line breaks in the text, put \A inside your text, and add white-space: pre; in the :after pseudo element properties. $categories: "nature", "general"; $labels: "All natural!\ANaturaaal!" "Another text"; @each $category, $label in zip($categories, $labels) { body.category-#{$category} .category-heading .category-logo.aspect-image { max-height: none; &:after …

---

<div class="post-metadata">

### Author: ![jordan-violet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan-violet/32/281428_2.png) [@jordan-violet](https://meta.discourse.org/u/jordan-violet)
#### Post date: [19 ביולי,‏ 2023,‏ 12:05pm UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016/7 "2023-07-19T12:05:24Z")

</div>

I’m going to try to make this into a theme plugin, thanks for this loop idea!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [18 באוגוסט,‏ 2023,‏ 12:06pm UTC](https://meta.discourse.org/t/how-to-change-text-of-this-span-object-with-no-selectors/272016/8 "2023-08-18T12:06:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
