_components.interact-button.scss 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * Stylings for Interact and Show Widget buttons.
  3. *
  4. * [1]: We abuse CSS selector specificity here since the buttons at the top of
  5. * the notebook might have both .interact-button and .js=nbinteract-widget.
  6. * [2]: We want the top buttons to be large.
  7. * [3]: However, a .js=nbinteract-widget appearing alone midway through the
  8. * notebook should be small.
  9. *
  10. */
  11. $color-interact-button: #5a5a5a !default;
  12. %interact-button {
  13. @include inuit-font-size(14px);
  14. background-color: $color-interact-button;
  15. border-radius: 3px;
  16. border: none;
  17. color: white;
  18. cursor: pointer;
  19. display: inline-block;
  20. font-weight: 700;
  21. /* [2] */
  22. padding: $spacing-unit-tiny $spacing-unit-med;
  23. text-decoration: none;
  24. &:hover,
  25. &:focus {
  26. text-decoration: none;
  27. }
  28. }
  29. .interact-button-logo {
  30. height: 1.35em;
  31. padding-right: 10px;
  32. margin-left: -5px;
  33. }
  34. .buttons {
  35. margin-bottom: $spacing-unit;
  36. /* [1] */
  37. .interact-button {
  38. @extend %interact-button;
  39. }
  40. }
  41. .js-nbinteract-widget {
  42. @extend %interact-button;
  43. /* [3] */
  44. padding: $spacing-unit-tiny $spacing-unit;
  45. margin-bottom: $spacing-unit-small;
  46. }
  47. // If the interact button link is changed with a REST param
  48. div.interact-context {
  49. display: inline;
  50. padding-left: 1em;
  51. }