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

fix: new semantic HTML selectors #887

Merged
merged 17 commits into from
Nov 16, 2021
Merged

fix: new semantic HTML selectors #887

merged 17 commits into from
Nov 16, 2021

Conversation

arzola
Copy link
Contributor

@arzola arzola commented Nov 5, 2021

This PR closes pressbooks/pressbooks#2452

How to test.

Export a book with different formats and you should see the same styling as the integrations/production networks.

@codecov
Copy link

codecov bot commented Nov 5, 2021

Codecov Report

Merging #887 (e7c63d1) into dev (84e4669) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #887   +/-   ##
=======================================
  Coverage   47.96%   47.96%           
=======================================
  Files           4        4           
  Lines         467      467           
=======================================
  Hits          224      224           
  Misses        243      243           
Impacted Files Coverage Δ
inc/helpers/namespace.php 48.78% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84e4669...e7c63d1. Read the comment docs.

@@ -219,13 +219,7 @@
}

@if $type == 'prince' {
h3.front-matter-number,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed anymore https://www.princexml.com/doc/pdf-bookmarks/#bookmark-levels because we are not using a title tag

@arzola arzola mentioned this pull request Nov 5, 2021
@SteelWagstaff SteelWagstaff self-requested a review November 5, 2021 19:06
@@ -167,7 +167,7 @@ h1.front-matter-title {
}

// PART TITLE COLOR
h3.part-number {
p.part-number {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better if we removed element selectors altogether and just targeted elements with the .part-number class?

Copy link
Contributor Author

@arzola arzola Nov 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we discussed that on Friday I wasn't sure if the .part-number exists in other contexts but definitely I can look into that

@arzola
Copy link
Contributor Author

arzola commented Nov 8, 2021

@SteelWagstaff I sent the agreed changes in the morning and I used a new commit message using the conventional commits strategy

@SteelWagstaff SteelWagstaff changed the title Styling replace non semantic tags fix: new semantic HTML selectors Nov 9, 2021
h1.back-matter-title + h2.chapter-subtitle,
.short-title + h2.chapter-subtitle {
h1.back-matter-title + .chapter-subtitle,
.short-title + p.chapter-subtitle {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove h1 and p references here?

Copy link
Member

@SteelWagstaff SteelWagstaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Differences between print PDF exports in old and new branches:

  1. Missing blank pages before and after half title page when book has 'before title page' content in new branch

  2. No space between contributors and press info on title page (left = new, right = old):
    Screenshot from 2021-11-15 09-30-17

  3. Subtitles in ToC are broken (left = new, right = old)
    Screenshot from 2021-11-15 09-33-28

  4. Footnote content in front matter missing in new exports:
    Screenshot from 2021-11-15 09-34-54

h1.back-matter-title + h2.chapter-author,
.short-title + h2.chapter-author {
h1.back-matter-title + .chapter-author,
.short-title + p.chapter-author {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove h1 and p references here?

margin-top: if-map-get($section-title-author-spacing, $type);
}

h2.chapter-subtitle + h2.chapter-author {
.chapter-subtitle + .chapter-author {
margin-top: if-map-get($section-subtitle-author-spacing, $type);
}

h1.back-matter-title:last-child {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove h1 reference here?

@@ -114,25 +114,25 @@
word-spacing: if-map-get($section-author-word-spacing, $type);
}

h2.chapter-title + h2.chapter-subtitle,
.short-title + h2.chapter-subtitle {
h2.chapter-title + .chapter-subtitle,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove h2 reference here?

@@ -177,7 +177,7 @@ blockquote.aphorism {
margin-bottom: 0;
}

h3.chapter-number {
p.chapter-number {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove p reference here?

@@ -78,25 +78,25 @@
word-spacing: if-map-get($section-author-word-spacing, $type);
}

h1.front-matter-title + h2.chapter-subtitle,
.short-title + h2.chapter-subtitle {
h1.front-matter-title + .chapter-subtitle,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove h1 reference here?

margin-top: if-map-get($section-title-subtitle-spacing, $type);
}

h1.front-matter-title + h2.chapter-author,
.short-title + h2.chapter-author {
h1.front-matter-title + .chapter-author,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove h1 reference here?

Copy link
Member

@SteelWagstaff SteelWagstaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Differences between digital PDF

  1. Links including author names are not styled with the same link color as other links in the ToC: Screenshot from 2021-11-15 09-39-14
  2. The introduction is not moved into its expected order -- should appear after the foreward. See https://guide.pressbooks.com/chapter/create-and-edit-front-matter/#chapter-179-section-5

Copy link
Member

@SteelWagstaff SteelWagstaff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for merging

@SteelWagstaff SteelWagstaff merged commit 9dbedfd into dev Nov 16, 2021
@SteelWagstaff SteelWagstaff deleted the pb-2452-styling branch November 16, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve styling for components which no longer use heading elements
2 participants