[Lens/SCSS] Delete and migrate reference_lines.scss file (#209982)

## Summary

Part of https://github.com/elastic/kibana/issues/208908

Replaces scss to css-in-js.


### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
This commit is contained in:
Maria Iriarte 2025-03-03 12:57:36 +01:00 committed by GitHub
parent 8cb484cb8d
commit 3b3bbb1a85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 24 deletions

View file

@ -8,7 +8,6 @@
*/
import './annotations.scss';
import './reference_lines/reference_lines.scss';
import React, { Fragment } from 'react';
import { snakeCase } from 'lodash';

View file

@ -1,18 +0,0 @@
.xyDecorationRotatedWrapper {
display: inline-block;
overflow: hidden;
line-height: 1.5;
.xyDecorationRotatedWrapper__label {
display: inline-block;
white-space: nowrap;
transform: translate(0, 100%) rotate(-90deg);
transform-origin: 0 0;
&::after {
content: '';
float: left;
margin-top: 100%;
}
}
}

View file

@ -7,8 +7,6 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
import './reference_lines.scss';
import React from 'react';
import { Position } from '@elastic/charts';
import type { FieldFormat } from '@kbn/field-formats-plugin/common';

View file

@ -10,6 +10,7 @@
import React from 'react';
import { Position } from '@elastic/charts';
import { EuiFlexGroup, EuiIcon, EuiIconProps, EuiText } from '@elastic/eui';
import { css } from '@emotion/react';
import type {
IconPosition,
ReferenceLineDecorationConfig,
@ -123,9 +124,12 @@ export function MarkerBody({
<div
className="xyDecorationRotatedWrapper"
data-test-subj="xyVisAnnotationText"
css={{
width: LINES_MARKER_SIZE,
}}
css={[
xyDecorationRotatedWrapperStyles,
{
maxWidth: LINES_MARKER_SIZE,
},
]}
>
<div
className="eui-textTruncate xyDecorationRotatedWrapper__label"
@ -221,3 +225,22 @@ export function Marker({
}
return null;
}
const xyDecorationRotatedWrapperStyles = css({
display: 'inline-block',
overflow: 'hidden',
lineHeight: 1.5,
'& .xyDecorationRotatedWrapper__label': {
display: 'inline-block',
whiteSpace: 'nowrap',
transform: 'translate(0, 100%) rotate(-90deg)',
transformOrigin: '0 0',
'&::after': {
content: '""',
float: 'left',
marginTop: '100%',
},
},
});

View file

@ -8,6 +8,7 @@
"common/**/*",
"public/**/*",
"server/**/*",
"../../../../../../typings/emotion.d.ts"
],
"kbn_references": [
{ "path": "../tsconfig.json" },