Advertisement
Guest User

Danbooru: collapsed sidebar

a guest
Mar 18th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.95 KB | None | 0 0
  1. @-moz-document domain("donmai.us") {
  2. /* This style changes the Danbooru image sidebar from a regular block on the left of  */
  3. /*  the page to a small handle, similar to the header icon; hovering over this handle */
  4. /*  will pop up the sidebar as an overlay.                                            */
  5. /* It has been designed to work with the Small Mode base style; it's mostly untested  */
  6. /*  as a standalone style alteration.  In particular, sizes may need adjustment if    */
  7. /*  Small Mode's font reductions are not in effect.                                   */
  8.  
  9. /* This style works very nicely in conjunction with the "floating sidebar" option.    */
  10.  
  11. /* Last updated 2013-03-19 by kounishin                           */
  12. /* May break if/when Danbooru page styles change after that date. */
  13. /* 2013-03-19: section#content now uses primarily margin, only a little */
  14. /*   padding; this style and the collapsed sidebar updated accordingly. */
  15.  
  16. /* absolute positioning is overridable by the floating-sidebar style, so less specific */
  17. #sidebar {
  18.   position: absolute !important;
  19.   z-index: 1800 !important;   /* translation notes are z-index: 1500 under Danbooru 2 */
  20. }
  21.  
  22. /* The width/position in this section is the collapsed state. */
  23. #page aside#sidebar {
  24.   width: 12px !important;  /* match width of navicon, allowing for r/l padding below */
  25.   top: 22px !important;   /* allow for height of navicon, borders for that and this, and any space desired */
  26.   left: 0px !important;
  27.   overflow: hidden !important;
  28.   white-space: nowrap !important;
  29.  
  30.   background: rgba(232,232,255,0.8) !important;
  31.   padding: 3px !important;
  32.   border: 2px solid #006FFA !important;
  33.   border-left-width: 0px !important;
  34.   border-top-right-radius: 10px !important;
  35.   border-bottom-right-radius: 10px !important;
  36.   opacity: 0.5 !important;
  37. }
  38.  
  39. #page aside#sidebar:hover {
  40.   width: auto !important;
  41.   overflow-x: hidden !important;
  42.   overflow-y: auto !important;
  43.  
  44.   opacity: 1 !important;
  45. }
  46.  
  47. /* to have the edges of the content ("?" wiki links for tags, etc) visible */
  48. /*  when the sidebar is collapsed, comment out these two rules.              */
  49. aside#sidebar > * {
  50.   padding-left: 38px !important; /* pad far enough to push content out of sight */
  51. }
  52. aside#sidebar:hover > * {
  53.   padding-left: 0 !important;
  54. }
  55.  
  56. /* reduce top margin for search box */
  57. #search-box {
  58.   margin-top: 0.5em !important;
  59. }
  60.  
  61. /* make post counts more visible against grayish background */
  62. aside#sidebar .post-count {
  63.   color: #888 !important;
  64. }
  65.  
  66. /* On pages with sidebar: reduce left-padding and allow further widening  */
  67. /*  for main content div (but don't use 100%, owing to padding).          */
  68. /* Make sure this selector is more specific than the one in the "floating */
  69. /*  sidebar" style, so as to override it.                                 */
  70. aside#sidebar + section#content {
  71.   margin-left: 1.2em !important;
  72.   padding-left: 0.3em !important;
  73.   max-width: 97% !important;
  74. }
  75.  
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement