小编Vla*_*mir的帖子

CSS标签符合条件有什么问题(例如h1.some-class)?

有人可以向我解释为什么标签限定是一个糟糕的CSS练习?为什么tag.class在自解释元素的情况下是坏的?例如

<section class="carousel-item">

  <header class="header of-carousel">
    <h2 class="heading of-carousel">Services</h2>
  </header>
    …
  <footer class="footer of-carousel">
    …
  </footer>

</section>
Run Code Online (Sandbox Code Playgroud)

为什么它应该比带有上下文修饰符的DRY和简洁代码更好?

<section class="carousel-item">

  <header class="of-carousel">
    <h2 class="of-carousel">Services</h2>
  </header>
    …
  <footer class="of-carousel">
    …
  </footer>

</section>

.of-carousel {
  header.& {…}
  h2.& {…}
  footer.& {…}
}
Run Code Online (Sandbox Code Playgroud)

甚至

section.carousel-item
  header
    h2
  footer

.carousel-item {
  header {…}
      h2 {…}
  footer {…}
}
Run Code Online (Sandbox Code Playgroud)

我看到很多人沉迷于BEM,但我不明白为什么?他们的选择器是如此丑陋,特别是在HTTP-2__时间.

css sass css-selectors

16
推荐指数
2
解决办法
3073
查看次数

Mac OS上的Tidy-html5:如何安装

请帮忙

我需要在Mac OS上安装HTML整洁 http://w3c.github.com/tidy-html5/

我在终端中调用命令并得不到任何结果:

$ make -C build/gmake/
make: *** build/gmake/: No such file or directory.  Stop.

$ sh build/gnuauto/setup.sh && ./configure && make
sh: build/gnuauto/setup.sh: No such file or directory
Run Code Online (Sandbox Code Playgroud)

有什么问题?我还应该安装什么?

macos terminal htmltidy

15
推荐指数
3
解决办法
9354
查看次数

标签 统计

css ×1

css-selectors ×1

htmltidy ×1

macos ×1

sass ×1

terminal ×1