/* * "Darkfish" Rdoc CSS * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $ * * Author: Michael Granger * */ /* vim: ft=css et sw=2 ts=2 sts=2 */ /* Base Green is: #6C8C22 */ /* 1. Variables and Root Styles */ :root { --sidebar-width: 300px; --primary-color: #2c8c5e; /* A more muted green */ --secondary-color: #246b4b; /* A darker, muted green */ --text-color: #333; --background-color: #f8f9fa; --code-block-background-color: #f0f4f8; --code-block-border-color: #d1d5da; --link-color: #246b4b; /* A muted teal-green color */ --link-hover-color: #25a28a; /* A slightly brighter teal-green */ --border-color: #e0e0e0; --sidebar-text-color: #2c3e50; /* Dark blue-gray for contrast */ /* Font family variables */ --font-primary: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif; --font-heading: 'Helvetica Neue', Arial, sans-serif; --font-code: 'Source Code Pro', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; } /* 2. Global Styles */ body { background: var(--background-color); font-family: var(--font-primary); font-weight: 400; color: var(--text-color); line-height: 1.6; /* Layout */ display: flex; flex-direction: column; min-height: 100vh; margin: 0; } /* 3. Typography */ h1 span, h2 span, h3 span, h4 span, h5 span, h6 span { position: relative; display: none; padding-left: 1em; line-height: 0; vertical-align: baseline; font-size: 10px; } h1 span { top: -1.3em; } h2 span { top: -1.2em; } h3 span { top: -1.0em; } h4 span { top: -0.8em; } h5 span { top: -0.5em; } h6 span { top: -0.5em; } h1:hover span, h2:hover span, h3:hover span, h4:hover span, h5:hover span, h6:hover span { display: inline; } h1:target, h2:target, h3:target, h4:target, h5:target, h6:target { margin-left: -10px; border-left: 10px solid #f1edba; } /* 4. Links */ :link, :visited { color: var(--link-color); text-decoration: none; transition: color 0.3s ease; font-weight: 600; /* Make links bolder */ } :link:hover, :visited:hover { color: var(--link-hover-color); text-decoration: underline; } /* 5. Code and Pre */ code, pre { font-family: var(--font-code); background-color: var(--code-block-background-color); border: 1px solid var(--code-block-border-color); border-radius: 6px; padding: 16px; overflow-x: auto; font-size: 15px; /* Increased from 14px */ line-height: 1.5; /* Slightly increased for better readability with larger font */ margin: 1em 0; /* Add some vertical margin */ } /* 6. Tables */ table { margin: 0; border-spacing: 0; border-collapse: collapse; } table tr th, table tr td { padding: 0.2em 0.4em; border: 1px solid #ccc; } table tr th { background-color: #eceaed; } table tr:nth-child(even) td { background-color: #f5f4f6; } /* 7. Navigation and Sidebar */ nav { font-family: var(--font-heading); font-size: 16px; border-right: 1px solid var(--border-color); position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-width); background: var(--background-color); overflow-y: auto; z-index: 10; display: flex; flex-direction: column; color: var(--sidebar-text-color); } nav[hidden] { display: none; } nav footer { padding: 1em; border-top: 1px solid #ccc; } nav .nav-section { margin-top: 1em; padding: 0 1em; } nav h2 { margin: 0 0 0.5em; padding: 0.5em 0; font-size: 1.2em; color: var(--text-color); border-bottom: 1px solid var(--border-color); } nav h3, #table-of-contents-navigation { margin: 0; padding: 0.5em 0; font-size: 1em; color: var(--text-color); } nav ul, nav dl, nav p { padding: 0; list-style: none; margin: 0.5em 0; } nav ul li { margin-bottom: 0.3em; } nav ul ul { padding-left: 1em; } nav ul ul ul { padding-left: 1em; } nav ul ul ul ul { padding-left: 1em; } nav a { color: var(--link-color); text-decoration: none; } nav a:hover { text-decoration: underline; } #navigation-toggle { z-index: 1000; font-size: 2em; display: block; position: fixed; top: 10px; left: 20px; cursor: pointer; } #navigation-toggle[aria-expanded="true"] { top: 10px; left: 250px; } nav ul li details { position: relative; padding-right: 1.5em; /* Add space for the marker on the right */ } nav ul li details > summary { list-style: none; /* Remove the default marker */ position: relative; /* So that the open/close triangle can position itself absolutely inside */ } nav ul li details > summary::after { content: '▶'; /* Unicode right-pointing triangle */ position: absolute; font-size: 0.8em; bottom: 0.1em; margin-left: 0.3em; transition: transform 0.2s ease; } nav ul li details[open] > summary::after { transform: rotate(90deg); /* Rotate the triangle when open */ } /* 8. Main Content */ main { flex: 1; display: block; margin: 3em auto; padding: 0 2em; max-width: 800px; font-size: 16px; line-height: 1.6; color: var(--text-color); box-sizing: border-box; } @media (min-width: 1024px) { main { margin-left: var(--sidebar-width); } } main h1, main h2, main h3, main h4, main h5, main h6 { font-family: var(--font-heading); } @media (min-width: 1024px) { .table-of-contents main { margin-left: 20em; } } #validator-badges { margin: 1em 1em 2em; font-size: smaller; } /* 9. Search */ #search-section { padding: 1em; background-color: var(--background-color); border-bottom: 1px solid var(--border-color); } #search-field-wrapper { position: relative; display: flex; align-items: center; } #search-field { width: 100%; padding: 0.5em 1em 0.5em 2.5em; border: 1px solid var(--border-color); border-radius: 20px; font-size: 14px; outline: none; transition: border-color 0.3s ease; background-color: var(--background-color); } #search-field:focus { border-color: var(--primary-color); } #search-field::placeholder { color: var(--text-color); opacity: 0.6; } #search-field-wrapper::before { content: "\1F50D"; /* Unicode for magnifying glass */ position: absolute; left: 0.75em; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-color); opacity: 0.6; } /* 10. Utility Classes */ .hide { display: none !important; } .initially-hidden { display: none; } /* 11. Media Queries */ @media (min-width: 1024px) { /* Styles for larger screens */ } /* 12. Print Styles */ @media print { /* Print-specific styles */ } /* 13. Syntax Highlighting */ .ruby-constant { color: #0366d6; } /* Bright blue for constants */ .ruby-keyword { color: #d73a49; } /* Red for keywords */ .ruby-ivar { color: #e36209; } /* Orange for instance variables */ .ruby-operator { color: #005cc5; } /* Dark blue for operators */ .ruby-identifier { color: #24292e; } /* Dark gray for identifiers */ .ruby-node { color: #22863a; } /* Green for interpolation */ .ruby-comment { color: #6a737d; } /* Gray for comments */ .ruby-regexp { color: #032f62; } /* Navy for regular expressions */ .ruby-value { color: #005cc5; } /* Dark blue for numeric values */ .ruby-string { color: #22863a; } /* Green for strings */ code { background-color: #f0f4f8; /* Match pre background */ padding: 0.2em 0.4em; border-radius: 3px; font-size: 85%; } em { text-decoration-color: rgba(52, 48, 64, 0.25); text-decoration-line: underline; text-decoration-style: dotted; } strong, em { background-color: rgba(158, 178, 255, 0.1); } /* 14. Specific Component Styles */ .table-of-contents ul { margin: 1em; list-style: none; } .table-of-contents ul ul { margin-top: 0.25em; } .table-of-contents ul :link, .table-of-contents ul :visited { font-size: 16px; } .table-of-contents li { margin-bottom: 0.25em; } .table-of-contents li .toc-toggle { width: 16px; height: 16px; background: url(../images/add.png) no-repeat; } .table-of-contents li .toc-toggle.open { background: url(../images/delete.png) no-repeat; } main { color: #333; } main > h1:first-child, main > h2:first-child, main > h3:first-child, main > h4:first-child, main > h5:first-child, main > h6:first-child { margin-top: 0px; } main sup { vertical-align: super; font-size: 0.8em; } /* The heading with the class name */ main h1[class] { margin-top: 0; margin-bottom: 1em; font-size: 2.5em; color: var(--primary-color); } main h1 { margin: 1.5em 0 0.5em; font-size: 2.2em; color: var(--secondary-color); } main h2 { margin: 1.3em 0 0.5em; font-size: 1.8em; color: var(--secondary-color); } main h3 { margin: 1.2em 0 0.5em; font-size: 1.5em; color: var(--secondary-color); } main h4 { margin: 1.1em 0 0.5em; font-size: 1.3em; color: var(--secondary-color); } main h5, main h6 { margin: 1em 0 0.5em; font-size: 1.1em; color: var(--secondary-color); } main p { line-height: 1.5em; font-weight: 400; } main pre { margin: 1.2em 0.5em; padding: 1em; font-size: 0.8em; } main hr { margin: 1.5em 1em; border: 2px solid #ddd; } main blockquote { margin: 0 2em 1.2em 1.2em; padding-left: 0.5em; border-left: 2px solid #ddd; } main ol, main ul { margin: 1em 2em; } main li > p { margin-bottom: 0.5em; } main dl { margin: 1em 0.5em; } main dt { margin-bottom: 0.5em; margin-right: 1em; float: left; font-weight: bold; } main dd { margin: 0 1em 1em 0.5em; } main header h2 { margin-top: 2em; border-width: 0; border-top: 4px solid #bbb; font-size: 130%; } main header h3 { margin: 2em 0 1.5em; border-width: 0; border-top: 3px solid #bbb; font-size: 120%; } .documentation-section-title { position: relative; } .documentation-section-title .section-click-top { position: absolute; top: 6px; left: 12px; font-size: 10px; color: #9b9877; visibility: hidden; padding-left: 0.5px; } .documentation-section-title:hover .section-click-top { visibility: visible; } .constants-list > dl { margin: 1em 0 2em; border: 0; } .constants-list > dl dt { margin-bottom: 0.75em; padding-left: 0; font-family: var(--font-code); font-size: 110%; } .constants-list > dl dt a { color: inherit; } .constants-list > dl dd { margin: 0 0 2em 0; padding: 0; color: #666; } .documentation-section h2 { position: relative; } .documentation-section h2 a { position: absolute; top: 8px; right: 10px; font-size: 12px; color: #9b9877; visibility: hidden; } .documentation-section h2:hover a { visibility: visible; } /* @group Method Details */ main .method-source-code { max-height: 0; overflow: auto; transition-duration: 200ms; transition-delay: 0ms; transition-property: all; transition-timing-function: ease-in-out; } main .method-source-code.active-menu { max-height: 100vh; } main .method-description .method-calls-super { color: var(--text-color); font-weight: bold; } main .method-detail { margin-bottom: 2.5em; cursor: pointer; } main .method-detail:target { margin-left: -10px; border-left: 10px solid #f1edba; } main .method-heading { position: relative; font-family: var(--font-code); font-size: 110%; font-weight: bold; color: var(--text-color); } main .method-heading :link, main .method-heading :visited { color: inherit; } main .method-click-advice { position: absolute; top: 2px; right: 5px; font-size: 12px; color: #9b9877; visibility: hidden; padding-right: 20px; line-height: 20px; background: url(../images/zoom.png) no-repeat right top; } main .method-header:hover .method-click-advice { visibility: visible; } main .method-alias .method-heading { color: #666; } main .method-description, main .aliases { margin-top: 0.75em; color: var(--text-color); } main .aliases { padding-top: 4px; font-style: italic; cursor: default; } main .method-description ul { margin-left: 1.5em; } main #attribute-method-details .method-detail:hover { background-color: transparent; cursor: default; } main .attribute-access-type { text-transform: uppercase; padding: 0 1em; } /* @end */ /* @end */ /* @group search results */ #search-results { font-family: var(--font-primary); font-weight: 300; } #search-results .search-match { font-family: var(--font-heading); font-weight: normal; } #search-results .search-selected { background: #e8e8e8; border-bottom: 1px solid transparent; } #search-results li { list-style: none; border-bottom: 1px solid #aaa; margin-bottom: 0.5em; } #search-results li:last-child { border-bottom: none; margin-bottom: 0; } #search-results li p { padding: 0; margin: 0.5em; } #search-results .search-namespace { font-weight: bold; } #search-results li em { background: yellow; font-style: normal; } #search-results pre { margin: 0.5em; font-family: var(--font-code); } @media (max-width: 480px) { nav { width: 100%; } main { margin: 1em auto; padding: 0 1em; max-width: 100%; } #navigation-toggle { right: 10px; left: auto; } #navigation-toggle[aria-expanded="true"] { left: auto; } table { display: block; overflow-x: auto; white-space: nowrap; } } /* @end */