From 3fd0cde7cb71284472929e5464c01aec1b2085a8 Mon Sep 17 00:00:00 2001 From: calvin Date: Thu, 21 Apr 2016 13:17:54 -0600 Subject: =?UTF-8?q?readme=20=E2=80=93=20format=20bullet=20points?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At "The shim consists of two parts:", the bullet points were previously formatted so that the `
`s were rendered outside the `
  • `s. This commit fixes that, which also lets the two rendered `
  • `s be in the same `
      `, which seems to more accurately represent the intended relationships. --- README.md | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index aac26a4..f2f6808 100644 --- a/README.md +++ b/README.md @@ -16,27 +16,29 @@ NOTE: This shim only adds support for the `hover` value of the `hover` media fea The shim consists of two parts: * A [PostCSS](https://github.com/postcss/postcss)-based server-side CSS postprocessor that rewrites -```css -@media (hover: hover) { - some-selector { - property: value; - } -} -``` -into -```css -some-prefix some-selector { - property: value; -} -``` -(In normal use-cases, `some-selector` will contain the `:hover` pseudo-class and `some-prefix` will be a specially-named CSS class that will typically be added to the `` element.) + + ```css + @media (hover: hover) { + some-selector { + property: value; + } + } + ``` + into + ```css + some-prefix some-selector { + property: value; + } + ``` + (In normal use-cases, `some-selector` will contain the `:hover` pseudo-class and `some-prefix` will be a specially-named CSS class that will typically be added to the `` element.) * A client-side JavaScript library that detects whether the user-agent truly supports hovering. When the check returns true, then your code can add the special CSS class to the appropriate element to enable [`:hover`](hover-pseudo) styles; for example: -```js -$(document).on('mq4hsChange', function (e) { - $(document.documentElement).toggleClass('some-special-class', e.trueHover); -}); -``` -Obviously, this requires JavaScript to be enabled in the browser, and would default to disabling `:hover` styles when JavaScript is disabled. + + ```js + $(document).on('mq4hsChange', function (e) { + $(document.documentElement).toggleClass('some-special-class', e.trueHover); + }); + ``` + Obviously, this requires JavaScript to be enabled in the browser, and would default to disabling `:hover` styles when JavaScript is disabled. [hover-pseudo]: https://developer.mozilla.org/en-US/docs/Web/CSS/:hover -- cgit v1.2.3