You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

52 lines
1.8 KiB

  1. <div class="bs-docs-section">
  2. <h1 id="third-parties" class="page-header">Third party support</h1>
  3. <p class="lead">While we don't officially support any third party plugins or add-ons, we do offer some useful advice to help avoid potential issues in your projects.</p>
  4. <h3 id="third-box-sizing">Box-sizing</h3>
  5. <p>Some third party software, including Google Maps and Google Custom Search Engine, conflict with Bootstrap due to <code>* { box-sizing: border-box; }</code>, a rule which makes it so <code>padding</code> does not affect the final computed width of an element. Learn more about <a href="http://css-tricks.com/box-sizing/">box model and sizing at CSS Tricks</a>.</p>
  6. <p>Depending on the context, you may override as-needed (Option 1) or reset the box-sizing for entire regions (Option 2).</p>
  7. {% highlight scss %}
  8. /* Box-sizing resets
  9. *
  10. * Reset individual elements or override regions to avoid conflicts due to
  11. * global box model settings of Bootstrap. Two options, individual overrides and
  12. * region resets, are available as plain CSS and uncompiled Less formats.
  13. */
  14. /* Option 1A: Override a single element's box model via CSS */
  15. .element {
  16. -webkit-box-sizing: content-box;
  17. -moz-box-sizing: content-box;
  18. box-sizing: content-box;
  19. }
  20. /* Option 1B: Override a single element's box model by using a Bootstrap Less mixin */
  21. .element {
  22. .box-sizing(content-box);
  23. }
  24. /* Option 2A: Reset an entire region via CSS */
  25. .reset-box-sizing,
  26. .reset-box-sizing *,
  27. .reset-box-sizing *:before,
  28. .reset-box-sizing *:after {
  29. -webkit-box-sizing: content-box;
  30. -moz-box-sizing: content-box;
  31. box-sizing: content-box;
  32. }
  33. /* Option 2B: Reset an entire region with a custom Less mixin */
  34. .reset-box-sizing {
  35. &,
  36. *,
  37. *:before,
  38. *:after {
  39. .box-sizing(content-box);
  40. }
  41. }
  42. .element {
  43. .reset-box-sizing();
  44. }
  45. {% endhighlight %}
  46. </div>