Skip to content
代码片段 群组 项目
未验证 提交 3d6af09f 编辑于 作者: Jose Ivan Vargas's avatar Jose Ivan Vargas 提交者: GitLab
浏览文件

Replace gl-line-clamp with the Tailwind equivalent

This enables the gl-line-clamp Tailwind plugin and
adds the gl-whitespace-normal class to match the
GitLab-UI utility class

Changelog: changed
上级 007a4b05
No related branches found
No related tags found
无相关合并请求
...@@ -341,7 +341,7 @@ export default { ...@@ -341,7 +341,7 @@ export default {
<div :class="{ 'gl-font-weight-bold': item.memberRoleId }">{{ item.text }}</div> <div :class="{ 'gl-font-weight-bold': item.memberRoleId }">{{ item.text }}</div>
<div <div
v-if="item.description" v-if="item.description"
class="gl-text-gray-700 gl-font-sm gl-pt-1 gl-line-clamp-2" class="gl-text-gray-700 gl-font-sm gl-pt-1 gl-line-clamp-2 gl-whitespace-normal"
> >
{{ item.description }} {{ item.description }}
</div> </div>
......
...@@ -134,7 +134,10 @@ export default { ...@@ -134,7 +134,10 @@ export default {
<div data-testid="access-level-link" :class="{ 'gl-font-weight-bold': item.memberRoleId }"> <div data-testid="access-level-link" :class="{ 'gl-font-weight-bold': item.memberRoleId }">
{{ item.text }} {{ item.text }}
</div> </div>
<div v-if="item.description" class="gl-text-gray-700 gl-font-sm gl-pt-1 gl-line-clamp-2"> <div
v-if="item.description"
class="gl-text-gray-700 gl-font-sm gl-pt-1 gl-line-clamp-2 gl-whitespace-normal"
>
{{ item.description }} {{ item.description }}
</div> </div>
</template> </template>
......
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
v-safe-html:[$options.safeHtmlConfig]="commit.titleHtml" v-safe-html:[$options.safeHtmlConfig]="commit.titleHtml"
:href="commit.webPath" :href="commit.webPath"
:class="{ 'gl-italic': !commit.message }" :class="{ 'gl-italic': !commit.message }"
class="commit-row-message item-title gl-line-clamp-1 !gl-break-all" class="commit-row-message item-title gl-line-clamp-1 gl-whitespace-normal !gl-break-all"
/> />
<gl-button <gl-button
v-if="commit.descriptionHtml" v-if="commit.descriptionHtml"
......
...@@ -559,6 +559,6 @@ ...@@ -559,6 +559,6 @@
} }
.projects-list .description p { .projects-list .description p {
@include gl-line-clamp-2; @apply gl-line-clamp-2 gl-whitespace-normal;
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -65,10 +65,6 @@ module.exports = { ...@@ -65,10 +65,6 @@ module.exports = {
*/ */
backgroundImage: false, backgroundImage: false,
/* /*
Our lineClamp also sets white-space: normal, which tailwind doesn't do, maybe we are okay?
*/
lineClamp: false,
/*
outline-none in tailwind is 2px solid transparent, we have outline: none outline-none in tailwind is 2px solid transparent, we have outline: none
I assume that tailwind has it's reasons, and we probably could enable it I assume that tailwind has it's reasons, and we probably could enable it
......
...@@ -46,6 +46,13 @@ export const mismatchAllowList = [ ...@@ -46,6 +46,13 @@ export const mismatchAllowList = [
'.border-l\\!', '.border-l\\!',
'.border-r\\!', '.border-r\\!',
'.border-t\\!', '.border-t\\!',
// Tailwind's line-clamp utils don't set `white-space: normal`, while our custom utils did.
// We have added `gl-whitespace-normal` wherever line-clamp utils were being used, so these
// mismatches can be ignored.
'.line-clamp-1',
'.line-clamp-2',
'.line-clamp-3',
]; ];
export function loadCSSFromFile(filePath) { export function loadCSSFromFile(filePath) {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册