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

Finish chapter "Styling applications" #82

Open
8 tasks
koendehondt opened this issue Apr 19, 2024 · 0 comments
Open
8 tasks

Finish chapter "Styling applications" #82

koendehondt opened this issue Apr 19, 2024 · 0 comments
Milestone

Comments

@koendehondt
Copy link
Collaborator

koendehondt commented Apr 19, 2024

Open issues from #60:

  • The chapter mentions themes, but it does not explain what themes are, how they are applied, and more importantly, how stylesheets relate to themes.
  • I think it should be stated clearly that some aspects of the UI cannot be styled with stylesheets, e.g. the colour of a selected element in a list or a table, the text selection colour, the caret colour, and the colour of the placeholder in a text field (this is a non-exhaustive list).
  • Are the two stylesheet examples in section 14.3 "STON notation" useful? I do not think so. It is good to give some idea about what is possible, but two pages of stylesheets is too much.
  • Section 14.3 "STON notation" associates stonNames with SpStyle subclasses, but the classes are introduced in the next section ("Anatomy of a style"). I think that both sections have to be rewritten to avoid forward references and to make the text easier to understand. There are still some questions in the sections that indicate this. "Anatomy of a style" should do just that: what is the syntax of a style? I would not mix it with code. The anatomy of a style is part of the STON notation. How the stonNames are mapped on classes should move to a separate (new) section.
  • As stated clearly in chapter 3 ("Most of Spec in one example"), "Defining a style class, however, works differently for each backend. While Gtk accepts (mostly) regular CSS to style your widgets, Morphic has its own sub-framework." I think this is a major issue because one of the core principles of Spec is reusability. That core principle breaks in the stylesheets. Chapter 14 does not give any examples of GTK stylesheets, which is a gap in the book. I am not advocating that it should be included, but stating that Morphic is the main focus is probably better than not saying anything about GTK.
  • It would be good to mention where to find the default stylesheet (SpStyle class>>#defaultStyleSheetData), but as flagged in SpStyle class>>#defaultStyleSheet, the default stylesheet should reside in the Pharo application, not in SpStyle class.

Other:

  • Check all code examples and images
  • Use screenshots in Pharo Light theme.
@koendehondt koendehondt added this to the Book release milestone Apr 19, 2024
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

No branches or pull requests

1 participant