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

CSS for all diagram items #3021

Merged
merged 44 commits into from
Jan 24, 2024
Merged

CSS for all diagram items #3021

merged 44 commits into from
Jan 24, 2024

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Jan 14, 2024

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

Issue Number: #3023

What is the new behavior?

New CSS capabilities:

  • All inline styling has been removed.
  • Inline styling is no longer supported by shapes.
  • icons can be styled with icon nodes.
  • compartments can be styles as compartment nodes.
  • Add :first-child selector.
  • Use the default stereotype_watches() function where possible
  • Do not propagate padding to child nodes. That can cause padding to be applied multiple times.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

  • It may be that properties like text-align and font-* leak through to child items in a diagram.
  • The only part of a diagram not styled is the diagram type/name pentagon on the top-left.

@github-actions github-actions bot added the python Pull requests that update Python code label Jan 14, 2024
Base automatically changed from css-from-package to main January 14, 2024 14:21
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Thanks @amolenaar, this looks great!

gaphor/UML/actions/tests/test_objectnode.py Outdated Show resolved Hide resolved
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Woops, reapproved this by accident.

gaphor/diagram/shapes.py Outdated Show resolved Hide resolved
@amolenaar
Copy link
Member Author

@danyeaw I added a lot more changes to this PR.

@amolenaar amolenaar changed the title Css diagram general CSS for all diagram items Jan 21, 2024
@amolenaar amolenaar linked an issue Jan 23, 2024 that may be closed by this pull request
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Thanks @amolenaar!! This is such a nice improvement, it will be much easier to create new toolboxes and maintain the ones we have with all the style centralized like this! 🤩

@danyeaw danyeaw added feature A new feature and removed python Pull requests that update Python code documentation labels Jan 24, 2024
@danyeaw danyeaw merged commit dfd7062 into main Jan 24, 2024
19 checks passed
@danyeaw danyeaw deleted the css-diagram-general branch January 24, 2024 01:37
@amolenaar
Copy link
Member Author

A next step may be to create some style sheets, so users can pick from a few predefined styles.

@amolenaar amolenaar mentioned this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fine grained CSS control
2 participants