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

ui5-toast cannot be overstyled #7596

Closed
1 task done
vladitasev opened this issue Sep 18, 2023 · 1 comment · Fixed by #8170
Closed
1 task done

ui5-toast cannot be overstyled #7596

vladitasev opened this issue Sep 18, 2023 · 1 comment · Fixed by #8170
Labels
Milestone

Comments

@vladitasev
Copy link
Contributor

Bug Description

Most of the CSS for ui5-toast is not set on the :host but instead inside the shadow root.

F.e. in Button.css we have:

:host {
	min-width: var(--_ui5_button_base_min_width);
	height: var(--_ui5_button_base_height);
	line-height: normal;
	font-family: var(--_ui5_button_fontFamily);
	font-size: var(--sapFontSize);
	text-shadow: var(--_ui5_button_text_shadow);
	border-radius: var(--_ui5_button_border_radius);
	cursor: pointer;
	background-color: var(--sapButton_Background);
	border: var(--sapButton_BorderWidth) solid var(--sapButton_BorderColor);
	color: var(--sapButton_TextColor);
	box-sizing: border-box;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

so ui5-button can be overstyled easily.

In ui5-toast we have:

:host {
	font-family: "72override", var(--sapFontFamily);
	color: var(--sapList_TextColor);
	font-size: var(--sapFontSize);
}

which is significantly less, and the rest is here:

.ui5-toast-root {
	position: fixed;
	display: none;
	box-sizing: border-box;
	max-width: 15rem;
	overflow: hidden;
	padding: 1rem;
	background: var(--_ui5_toast_background);
	box-shadow: var(--_ui5_toast_shadow);
	border-radius: var(--sapElement_BorderCornerRadius);
	transition-property: opacity;
	opacity: 1;
	font-family: inherit;
	color: inherit;
	font-weight: inherit;
	font-size: inherit;
	word-wrap: break-word;
	text-align: center;
	text-overflow: ellipsis;
	white-space: pre-line;
}

Please move all relevant CSS from .ui5-toast-root to :host

Affected Component

ui5-toast

Expected Behaviour

No response

Isolated Example

No response

Steps to Reproduce

...

Log Output, Stack Trace or Screenshots

No response

Priority

Medium

UI5 Web Components Version

latest

Browser

Chrome, Edge, Firefox, Safari

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@vladitasev vladitasev added bug This issue is a bug in the code TOPIC P enhancement New feature or request labels Sep 18, 2023
@hristop hristop removed the bug This issue is a bug in the code label Oct 9, 2023
@hristop
Copy link
Contributor

hristop commented Oct 23, 2023

Internal BLI was created: FIORITECHP1-28885

@hristop hristop added this to the 1.21.0 milestone Dec 15, 2023
@hristop hristop modified the milestones: 1.21.0, 1.22.0 Jan 5, 2024
MapTo0 added a commit that referenced this issue Jan 24, 2024
MapTo0 added a commit that referenced this issue Jan 30, 2024
@petyabegovska petyabegovska moved this to Completed in Planning - Topic RL Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

3 participants