Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor carnival tables #529

Merged
merged 32 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
59f1f8c
start refactoring basic tables
kswanson33 Jun 25, 2024
7ba1c03
Style header row in middle of table in nursing-internal and refactor …
jbwilson8 Jul 9, 2024
10f6e25
Style header row in middle of table in nursing-internal and refactor …
jbwilson8 Jul 12, 2024
b3f8777
style header in middle of table and refactor tables in nursing-internal
jbwilson8 Jul 25, 2024
72721bf
adding missing styles
jbwilson8 Jul 25, 2024
8c51a7c
update selector
jbwilson8 Jul 25, 2024
f9448c1
update table selector
jbwilson8 Jul 25, 2024
e5d4cab
update font family attribute for header in middle of table
jbwilson8 Jul 25, 2024
8d67e38
update font for header row in nursing internal
jbwilson8 Jul 25, 2024
6a92c72
Delete _theme.scss
jbwilson8 Jul 25, 2024
dd0eb72
update feature files to use _colors.scss and _fonts.scss instead of _…
jbwilson8 Jul 25, 2024
b4431f3
properly nest td selectors
jbwilson8 Jul 25, 2024
5dd2008
update default color value
jbwilson8 Jul 25, 2024
a76623b
update default color value
jbwilson8 Jul 25, 2024
7b413f7
added comment for font change
jbwilson8 Jul 25, 2024
bee03d7
update selector for vertically tight tables mixin
jbwilson8 Jul 25, 2024
15d4b60
Merge branch 'main' into nursing-internal-tables
jbwilson8 Jul 25, 2024
c8664bf
remove comment
jbwilson8 Jul 25, 2024
3cfd6a8
consolidate redundant selectors in mixins
jbwilson8 Aug 8, 2024
c44db0c
consolidate styles
jbwilson8 Aug 8, 2024
8aae6bc
Merge branch 'main' into nursing-internal-tables
jbwilson8 Aug 8, 2024
46e6d89
revise selector nesting
jbwilson8 Aug 9, 2024
32abf71
added missing selector for tables with exercises
jbwilson8 Aug 9, 2024
548194e
condensed table mixin
jbwilson8 Aug 9, 2024
ad64974
consolidated table-from-exercise mixin
jbwilson8 Aug 9, 2024
10bf0e5
Merge branch 'main' into nursing-internal-tables
jbwilson8 Aug 9, 2024
ce142b7
consolidate selectors
jbwilson8 Aug 13, 2024
5045989
Merge branch 'nursing-internal-tables' of https://github.com/openstax…
jbwilson8 Aug 13, 2024
64343a5
Merge branch 'main' into nursing-internal-tables
jbwilson8 Aug 13, 2024
d63cd93
Move selectors to top of mixin
jbwilson8 Aug 13, 2024
722d029
organized refactored styles
jbwilson8 Aug 19, 2024
854a501
Merge branch 'main' into nursing-internal-tables
jbwilson8 Aug 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

* Style `header row` in middle of table and refactor `table shapes` in `nursing-internal`
* Unnumbered `Learning Objectives` in `computer-science`
* Style `answer-key` in `neuroscience`
* Add check for whether output compiled to CI
Expand Down
32 changes: 7 additions & 25 deletions styles/books/nursing-internal/book.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use 'lib/carnival/carnival';
@use 'lib/carnival/colors';

$PagesWithBands: (
(pageName: eoc, firstSelector: '.os-eoc.os-summary-container', generalSelector: '.os-eoc'),
Expand Down Expand Up @@ -86,25 +87,6 @@ $ChapterIntroType: fullWidth;
),
));

// Tables
@include add_settings((
BasicTable: (
_selectors: ('.os-table:not(.os-unstyled-container)'),
'TableBottomBorderAfterTable:::border-top-color': (_ref: 'colorMap:::nursingTableColor'),
),
ColumnHeaderTable: (
_selectors: ('.os-table.os-column-header-container'),
'LastTableRowData:::border-bottom-color': (_ref: "colorMap:::nursingTableColor"),
'FirstTableRow:::border-top-color': (_ref: "colorMap:::nursingTableColor"),
),
));

@include add_settings((
VerticallyTightTable: (
_selectors: ('.os-table.os-vertically-tight-container > table.vertically-tight')
)
));

//Centered Text
@include add_settings((
CenteredText: (
Expand Down Expand Up @@ -253,12 +235,12 @@ $ChapterIntroType: fullWidth;
@include use('FigureFromInjectedSolution','carnival:::FigureFromExercisesShape');

// Tables
@include use('BasicTable', 'carnival:::BasicTableShape');
@include use('TableFromEoCExercises','carnival:::TableFromExercisesShape');
@include use('TableAfterExercisePara', 'carnival:::TableTopSpacingShape');
@include use('ColumnHeaderTable', 'carnival:::ColumnHeaderTableShape');
@include use('VerticallyTightTable', 'carnival:::VerticallyTightTableShape');
@include use('ColumnsFromTable', 'carnival:::ColumnsShape');
@include carnival.basic-table(colors.$B2);
@include carnival.table-from-exercise();
@include carnival.table-top-spacing();
@include carnival.column-header-table(colors.$B2);
@include carnival.vertically-tight-table();
@include carnival.table-column();

// Lists
@include use('PageLists', 'carnival:::PageListsShape');
Expand Down
1 change: 1 addition & 0 deletions styles/lib/carnival/_carnival.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@forward 'lib/carnival/features/exercises';
@forward 'lib/carnival/features/tables';
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Colors
$O1: #F37541;
$O1Op5: #F375410D;
$O2: #CE472C;
Expand Down
2 changes: 2 additions & 0 deletions styles/lib/carnival/_fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$mulish: Mulish, sans-serif;
$plex: IBM Plex Sans, sans-serif;
5 changes: 3 additions & 2 deletions styles/lib/carnival/features/_exercises.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use 'lib/carnival/theme' as carnival;
@use 'lib/carnival/colors';
@use 'lib/carnival/fonts';

@mixin exercises($element, $number-width: null) {
#{$element} {
Expand Down Expand Up @@ -34,7 +35,7 @@
@mixin -number($width: null) {
display: table-cell;
text-decoration: none;
color: carnival.$black;
color: colors.$black;
font-weight: bold;
width: $width;
text-align: right;
Expand Down
Loading
Loading