Skip to content

Commit

Permalink
Modernize RDoc Darkfish template CSS
Browse files Browse the repository at this point in the history
- Update color scheme with muted green tones and improved contrast
- Enhance readability by adjusting font sizes and weights
- Improve code block styling with a light gray background
- Refactor layout for better responsiveness and sidebar presentation
- Standardize link styles across the document
- Implement CSS variables for easier theme customization
- Adjust heading styles for better visual hierarchy
- Enhance table and list styling for improved readability
- Optimize search field and navigation toggle appearance
- Improve method detail and documentation section styling

These changes aim to create a more modern, readable, and visually appealing
documentation template while maintaining the core Darkfish design.
  • Loading branch information
st0012 committed Aug 17, 2024
1 parent 07d64d8 commit 16ee180
Showing 1 changed file with 35 additions and 30 deletions.
65 changes: 35 additions & 30 deletions lib/rdoc/generator/template/darkfish/css/rdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,45 @@ h6:target {
code,
pre {
font-family: 'Source Code Pro', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
background-color: #f1f3f5;
padding: 0.2em 0.4em;
border-radius: 4px;
font-size: 0.9em;
background-color: #f0f4f8; /* Slightly darker gray background */
border: 1px solid #d1d5da;
border-radius: 6px;
padding: 16px;
overflow-x: auto;
font-size: 14px;
line-height: 1.45;
margin: 1em 0; /* Add some vertical margin */
}

pre {
padding: 1em;
background-color: #f0f4f8; /* Slightly darker gray background */
border: 1px solid #d1d5da;
border-radius: 6px;
padding: 16px;
overflow-x: auto;
border: 1px solid var(--border-color);
font-family: 'Source Code Pro', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 14px;
line-height: 1.45;
margin: 1em 0; /* Add some vertical margin */
}

/* Syntax highlighting */
.ruby-constant { color: #005cc5; } /* Blue */
.ruby-keyword { color: #d73a49; } /* Red */
.ruby-ivar { color: #e36209; } /* Orange */
.ruby-operator { color: #005cc5; } /* Blue */
.ruby-identifier { color: #6f42c1; } /* Purple */
.ruby-node { color: #22863a; } /* Green */
.ruby-comment { color: #6a737d; } /* Gray */
.ruby-regexp { color: #032f62; } /* Navy */
.ruby-value { color: #005cc5; } /* Blue */
.ruby-string { color: #032f62; } /* Navy */

code {
background-color: #f0f4f8; /* Match pre background */
padding: 0.2em 0.4em;
border-radius: 3px;
font-size: 85%;
}

em {
Expand Down Expand Up @@ -695,30 +724,6 @@ main .attribute-access-type {

/* @end */

/* @group Source Code */

pre {
margin: 0.5em 0;
border: 1px dashed #999;
padding: 0.5em;
background: #262626;
color: white;
overflow: auto;
}

.ruby-constant { color: #7fffd4; background: transparent; }
.ruby-keyword { color: #00ffff; background: transparent; }
.ruby-ivar { color: #eedd82; background: transparent; }
.ruby-operator { color: #00ffee; background: transparent; }
.ruby-identifier { color: #ffdead; background: transparent; }
.ruby-node { color: #ffa07a; background: transparent; }
.ruby-comment { color: #dc0000; background: transparent; }
.ruby-regexp { color: #ffa07a; background: transparent; }
.ruby-value { color: #7fffd4; background: transparent; }

/* @end */


/* @group search results */
#search-results {
font-family: Lato, sans-serif;
Expand Down

0 comments on commit 16ee180

Please sign in to comment.