Add docs regarding .progress, inline style attrs, and CSP #18080

Merged
merged 1 commit into from Oct 30, 2015

2 participants

@cvrebert
Bootstrap member

Closes #17785.
CC: @mdo @patrickhlauke

@cvrebert cvrebert added docs v3 labels Oct 27, 2015
@cvrebert cvrebert added this to the v3.3.6 milestone Oct 27, 2015
@patrickhlauke patrickhlauke commented on an outdated diff Oct 27, 2015
docs/_includes/components/progress-bars.html
@@ -8,6 +8,11 @@ <h1 id="progress" class="page-header">Progress bars</h1>
<p>Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.</p>
</div>
+ <div class="bs-callout bs-callout-info">
+ <h4 id="callout-progress-csp">Content Security Policy (CSP) compatibility</h4>
+ <p>If your website has a <a href="https://developer.mozilla.org/en-US/docs/Web/Security/CSP">Content Security Policy (CSP)</a> which doesn't allow <code>style-src 'unsafe-inline'</code>, then you won't be able to use inline <code>style</code> attributes to set progress bar widths as shown in our examples below. Alternative methods for setting the widths that are compatible with strict CSPs include using a little custom JavaScript or using custom CSS classes.</p>
@patrickhlauke
Bootstrap member

maybe using JavaScript (to inject inline styles) or CSS classes ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@cvrebert cvrebert Add docs regarding .progress, inline style attrs, and CSP; closes #17785


[skip sauce]
6e1e77b
@cvrebert
Bootstrap member

@patrickhlauke Added a little bit to the JS phrasing.

@patrickhlauke
Bootstrap member

LGTM

@cvrebert cvrebert merged commit a367408 into master Oct 30, 2015

3 checks passed

Details continuous-integration/travis-ci/pr The Travis CI build passed
Details continuous-integration/travis-ci/push The Travis CI build passed
hound No violations found. Woof!
@cvrebert cvrebert deleted the csp-progress branch Oct 30, 2015
@mdo mdo referenced this pull request Oct 30, 2015
Closed

v3.3.6 ship list #16644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment