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(code): display error when inserting long code inputs #138

Merged
merged 3 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
4 changes: 2 additions & 2 deletions packages/libraries/theming/size/ods-theming-size.code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
@return (
border-radius: var(--ods-size-code-#{$size-name}-border-radius),
min-height: var(--ods-size-code-#{$size-name}-min-height),
padding-y: var(--ods-size-code-#{$size-name}-padding-y),
padding-x: var(--ods-size-code-#{$size-name}-padding-x)
global-padding: var(--ods-size-code-#{$size-name}-global-padding),
code-padding: var(--ods-size-code-#{$size-name}-code-padding)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,17 @@
// CSS for the component but not for theming
:host {
@include osds-code-on-main-element() {
position: relative;
margin: 0;
display: flex;
justify-content: space-between;

@include osds-code-on-container-element() {
flex: 1 1 auto;
display: flex;
justify-content: flex-start;
align-items: flex-start;
flex-grow: 1;
white-space: pre-line;
}
}
}

slot[name='copy'] {
display: flex;
margin: var(--ods-size-03);
::slotted([slot="copy"]) {
flex-shrink: 0;
}
}

// apply the theme template for the component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
@import './osds-code.mixins';

@mixin osds-code-theme-size() {
/** sizes */

@include ods-foreach-theme-size(code) using ($sizes) {
@include osds-code-on-selected-host() {
border-radius: ods-get-size-property($sizes, border-radius);
margin: 0; // browser reset of <pre> tag
min-height: ods-get-size-properties($sizes, min-height);
padding: 0;
padding: ods-get-size-property($sizes, global-padding);


@include osds-code-on-container-element() {
padding: ods-get-size-property($sizes, padding-y) ods-get-size-property($sizes, padding-x);
padding: ods-get-size-property($sizes, code-padding);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/themes/blue-jeans/theme/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@
$code: (
md: (
border-radius: var(--ods-size-border-radius-01),
min-height: calc(2.75rem * var(--ods-size-ratio)),
padding-y: var(--ods-size-inline-05),
padding-x: var(--ods-size-inline-05)
min-height: var(--ods-size-09),
global-padding: var(--ods-size-inset-03),
code-padding: var(--ods-size-inset-04)
),
),
$divider: (
Expand Down