# CSS Coding Guideline

**URL:** https://forum.shopware.com/t/css-coding-guideline/39303
**Category:** Themes & Design
**Created:** [24. August 2016 um 11:36 UTC](https://forum.shopware.com/t/css-coding-guideline/39303 "2016-08-24T11:36:47Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![salvage](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@salvage](https://forum.shopware.com/u/salvage)
#### Post date: [24. August 2016 um 11:36 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/1 "2016-08-24T11:36:47Z")

</div>

Hallo!

Weiß jemand ob Shopware beim CSS/Less-Code in ihren eigenen Themes (Bare, Responsive)&nbsp;einer bestimmten Konvention folgt?  
Man findet häuftig innerhalb von CSS-Klassenselektoren Untertrennungen mit „–“.  
Ich dachte es ist vielleicht die Guideline [BEM](http://cssguidelin.es/#bem-like-naming), aber da kein „\_\_“ verwendet wird ist das wohl eher nicht der Fall.

---

<div class="post-metadata">

### Author: ![steinsoftware](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@steinsoftware](https://forum.shopware.com/u/steinsoftware)
#### Post date: [24. August 2016 um 12:06 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/2 "2016-08-24T12:06:12Z")

</div>

Anlehnung an Bootstrap siehe:

[https://developers.shopware.com/designers-guide/less/#predefined-mixins-and-components](https://developers.shopware.com/designers-guide/less/#predefined-mixins-and-components)

---

<div class="post-metadata">

### Author: ![greoj](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@greoj](https://forum.shopware.com/u/greoj)
#### Post date: [24. August 2016 um 13:52 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/3 "2016-08-24T13:52:34Z")

</div>

Hallo,

das hatte ich mich auch schon mal gefragt.

Beim Feature Overview im Theme Startup Guide steht ein bißchen was:

> - State of the art technologies -&nbsp;[bower](http://bower.io/)&nbsp;as the package manager for third-party components - Feature detection using&nbsp;[Modernizr](http://modernizr.com/)&nbsp;- **Pure CSS responsive grid system using&nbsp;[PocketGrid](http://arnaudleray.github.io/pocketgrid/)&nbsp;**-&nbsp;[jQuery](http://jquery.com/)&nbsp;2.1.11 included - CSS3 Animations with a jQuery fallback using&nbsp;[jQuery Transit](http://ricostacruz.com/jquery.transit/)&nbsp;- Scalable icon set with 295 pre defined icons

**Siehe** :&nbsp;[Shopware 5 Theme Startup Guide](https://developers.shopware.com/designers-guide/theme-startup-guide/)  
**Auch interessant** :&nbsp;[Finding Smarty blocks in Shopware](https://developers.shopware.com/designers-guide/find-smarty-blocks/) (Beschreibung der CSS-Klassen in body-tag)

---

<div class="post-metadata">

### Author: ![salvage](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@salvage](https://forum.shopware.com/u/salvage)
#### Post date: [24. August 2016 um 16:14 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/4 "2016-08-24T16:14:23Z")

</div>

Danke euch! Das sind gute Anhaltspunkte.

---

<div class="post-metadata">

### Author: ![Stephan\_Pohl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/stephan_pohl/32/10212_2.png) [@Stephan\_Pohl](https://forum.shopware.com/u/Stephan_Pohl)
#### Post date: [25. August 2016 um 09:22 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/5 "2016-08-25T09:22:32Z")

</div>

Hey zusammen,

ich werde euch hierzu einen Blog-Post in unseren Developer Blog aufsetzen. Wenn ich soweit bin, dann melde ich mich hier noch mal.

Viele Grüße,  
Stephan Pohl&nbsp; ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware")

---

<div class="post-metadata">

### Author: ![Stephan\_Pohl](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/stephan_pohl/32/10212_2.png) [@Stephan\_Pohl](https://forum.shopware.com/u/Stephan_Pohl)
#### Post date: [26. August 2016 um 11:55 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/6 "2016-08-26T11:55:31Z")

</div>

Hey zusammen, wie gestern versprochen habe ich euch einen Blog-Post über unsere CSS Coding Guidelines geschrieben:

> **[CSS coding guidelines](https://developers.shopware.com/blog/2016/08/26/css-coding-guidelines/)**
>
> Coding guidelines are important to improve collaboration and code quality. A lot of questions regarding our CSS coding
> guidelines are coming up on our vari

Viele Grüße,  
Stephan Pohl&nbsp; ![Shopware](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "Shopware")

---

<div class="post-metadata">

### Author: ![KevinS86](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@KevinS86](https://forum.shopware.com/u/KevinS86)
#### Post date: [26. August 2016 um 13:25 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/7 "2016-08-26T13:25:20Z")

</div>

hey Stephan,

vielen Dank für deine Mühe. Und das bei dem Wetter ;)&nbsp;

Schönes Wochenende wünsche ich dir.

Liebe Grüße

Kevin

---

<div class="post-metadata">

### Author: ![rexblack](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rexblack](https://forum.shopware.com/u/rexblack)
#### Post date: [24. November 2018 um 18:46 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/8 "2018-11-24T18:46:32Z")

</div>

Also, ich kann im Shopware Responsive Theme beim besten Willen keine BEM-Struktur erkennen. Descendents ohne parents usw.  
Absolutes Chaos.

---

<div class="post-metadata">

### Author: ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)
#### Post date: [24. November 2018 um 19:02 UTC](https://forum.shopware.com/t/css-coding-guideline/39303/9 "2018-11-24T19:02:12Z")

</div>

In der Guideline steht ja auch drin:

> There are quite a few guides and principles how you should write your CSS code. Two of the most popular ones are&nbsp;[BEM](http://getbem.com/introduction/)&nbsp;&&nbsp;[SMACSS](https://smacss.com/). Our guidelines are based on these two. **We took the best parts of them and modified them to our needs**.
