# مشكلة عرض في عنصر "إخفاء التفاصيل"

**URL:** <https://meta.discourse.org/t/display-issue-in-the-hide-details-element/227626>\
**Category:** UX\
**Tags:** hide-details\
**Created:** [20 مايو 2022، 4:19م UTC](https://meta.discourse.org/t/display-issue-in-the-hide-details-element/227626 "2022-05-20T16:19:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<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:** [20 مايو 2022، 4:19م UTC](https://meta.discourse.org/t/display-issue-in-the-hide-details-element/227626/1 "2022-05-20T16:19:20Z")

</div>

في هذا المقطع،

```plaintext
[details="Summary"]
This text will be hidden
[/details]

```

هناك قاعدتان من CSS تجعلان `display: block` على كل العناصر الفرعية أو الشقيقة:

```scss
details[open] > *, details[open] .lightbox-wrapper {
    display: block;
}

```

```scss
details[open] > summary:first-of-type ~ *,
details.open > summary:first-of-type ~ * {
    display: block;
}

```

هذه مشكلة لأن كل عنصر من المفترض أن يكون مضمنًا سيتم عرضه ككتلة بدلاً من ذلك، ويشغل كل العرض. مثل `span` أو رابط. ما الغرض من هذه القواعد؟ 🤔

مثال:

```xml
[details="Hidden"]
Enhanced image and comparison with the same halo on Earth:
![66bb711c57dd10e4e4f9713ebeec0ccec9a8d0dc1|220x499](upload://eEOifbxarMIErU6OnozO45BJq0I.jpeg)
![541efc040f313220531d74677a9105e44890c29c1|442x500](upload://c0ausOGkNA0BJMAsmAnOqmpWBv6.jpeg)
Though Mars's atmosphere is composed of 95% of carbon dioxide (CO<sub>2</sub>), the halo was produced by water (H<sub>2</sub>O) ice crystal, hence the similarity with the common Earth 22° [halo](https://en.wikipedia.org/wiki/22%C2%B0_halo?oldformat=true). It's exactly the same, in fact.
[/details]

```

↓

> **Hidden**
>
> Enhanced image and comparison with the same halo on Earth:
> 
> ![66bb711c57dd10e4e4f9713ebeec0ccec9a8d0dc1](https://global.discourse-cdn.com/meta/original/4X/6/6/b/66bb711c57dd10e4e4f9713ebeec0ccec9a8d0dc.jpeg)  
> ![541efc040f313220531d74677a9105e44890c29c1](https://global.discourse-cdn.com/meta/original/4X/5/4/1/541efc040f313220531d74677a9105e44890c29c.jpeg)  
> Though Mars’s atmosphere is composed of 95% of carbon dioxide (CO2), the halo was produced by water (H2O) ice crystal, hence the similarity with the common Earth 22° [halo](https://en.wikipedia.org/wiki/22%C2%B0_halo?oldformat=true). It’s exactly the same, in fact.

* * *

هنا يوجد 3 عناصر مضمنة: `<sub>` ورابط:

* * *

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/1/a/71a268c396427f4c28e9b40fdf5aa5533abfce65.png)

* * *

تختفي المشكلة إذا قمنا بتمكين الوضع الآمن وتعطيل جميع الإضافات، حتى لو لم يكن لدينا أي إضافات مخصصة مثبتة:

* * *

![image](https://global.discourse-cdn.com/meta/original/4X/4/e/6/4e6fc880531b92353660cf49feb1be0b1d8bf73d.png)

* * *

مثال فيديو من [try.discourse.org](http://try.discourse.org):

---

_[View the full topic](https://meta.discourse.org/t/display-issue-in-the-hide-details-element/227626)._
