flex布局样式 类名化scss(sass)

sass 和less 语法有差异需要转化一下


$directionList: row, row-reverse, column, column-reverse;
$justifyContentList: flex-start, flex-end, center, space-between, space-around, space-evenly;
$alignItemsList: flex-start, flex-end, center, baseline, stretch;@mixin generateFlex($dr, $JC, $AI, $dir, $jc, $ai) {@if ($ai == center) {// flex-x-center.flex-#{$dr}-#{$JC} {display: flex;flex-direction: $dir;justify-content: $jc;align-items: center;}} @else {.flex-#{$dr}-#{$JC}-#{$AI} {display: flex;flex-direction: $dir;justify-content: $jc;align-items: $ai;}}
}@each $dir in $directionList {$dr: if($dir == row, x, if($dir == column, y, $dir));@each $jc in $justifyContentList {$JC: if($jc == flex-start, start, if($jc == flex-end, end, if($jc == space-between, between, if($jc == space-evenly, evenly, if($jc == space-around, around, $jc)))));@each $ai in $alignItemsList {$AI: if($ai == flex-start, start, if($ai == flex-end, end, $ai));@include generateFlex($dr, $JC, $AI, $dir, $jc, $ai);}}
}

编译后

.flex-x-start-start {align-items: flex-start;display: flex;flex-direction: row;justify-content: flex-start;
}
.flex-x-start-end {align-items: flex-end;display: flex;flex-direction: row;justify-content: flex-start;
}
.flex-x-start {align-items: center;display: flex;flex-direction: row;justify-content: flex-start;
}
.flex-x-start-baseline {align-items: baseline;display: flex;flex-direction: row;justify-content: flex-start;
}
.flex-x-start-stretch {align-items: stretch;display: flex;flex-direction: row;justify-content: flex-start;
}
.flex-x-end-start {align-items: flex-start;display: flex;flex-direction: row;justify-content: flex-end;
}
.flex-x-end-end {align-items: flex-end;display: flex;flex-direction: row;justify-content: flex-end;
}
.flex-x-end {align-items: center;display: flex;flex-direction: row;justify-content: flex-end;
}
.flex-x-end-baseline {align-items: baseline;display: flex;flex-direction: row;justify-content: flex-end;
}
.flex-x-end-stretch {align-items: stretch;display: flex;flex-direction: row;justify-content: flex-end;
}
.flex-x-center-start {align-items: flex-start;display: flex;flex-direction: row;justify-content: center;
}
.flex-x-center-end {align-items: flex-end;display: flex;flex-direction: row;justify-content: center;
}
.flex-x-center {align-items: center;display: flex;flex-direction: row;justify-content: center;
}
.flex-x-center-baseline {align-items: baseline;display: flex;flex-direction: row;justify-content: center;
}
.flex-x-center-stretch {align-items: stretch;display: flex;flex-direction: row;justify-content: center;
}
.flex-x-between-start {align-items: flex-start;display: flex;flex-direction: row;justify-content: space-between;
}
.flex-x-between-end {align-items: flex-end;display: flex;flex-direction: row;justify-content: space-between;
}
.flex-x-between {align-items: center;display: flex;flex-direction: row;justify-content: space-between;
}
.flex-x-between-baseline {align-items: baseline;display: flex;flex-direction: row;justify-content: space-between;
}
.flex-x-between-stretch {align-items: stretch;display: flex;flex-direction: row;justify-content: space-between;
}
.flex-x-around-start {align-items: flex-start;display: flex;flex-direction: row;justify-content: space-around;
}
.flex-x-around-end {align-items: flex-end;display: flex;flex-direction: row;justify-content: space-around;
}
.flex-x-around {align-items: center;display: flex;flex-direction: row;justify-content: space-around;
}
.flex-x-around-baseline {align-items: baseline;display: flex;flex-direction: row;justify-content: space-around;
}
.flex-x-around-stretch {align-items: stretch;display: flex;flex-direction: row;justify-content: space-around;
}
.flex-row-reverse-start-start {align-items: flex-start;display: flex;flex-direction: row-reverse;justify-content: flex-start;
}
.flex-row-reverse-start-end {align-items: flex-end;display: flex;flex-direction: row-reverse;justify-content: flex-start;
}
.flex-row-reverse-start {align-items: center;display: flex;flex-direction: row-reverse;justify-content: flex-start;
}
.flex-row-reverse-start-baseline {align-items: baseline;display: flex;flex-direction: row-reverse;justify-content: flex-start;
}
.flex-row-reverse-start-stretch {align-items: stretch;display: flex;flex-direction: row-reverse;justify-content: flex-start;
}
.flex-row-reverse-end-start {align-items: flex-start;display: flex;flex-direction: row-reverse;justify-content: flex-end;
}
.flex-row-reverse-end-end {align-items: flex-end;display: flex;flex-direction: row-reverse;justify-content: flex-end;
}
.flex-row-reverse-end {align-items: center;display: flex;flex-direction: row-reverse;justify-content: flex-end;
}
.flex-row-reverse-end-baseline {align-items: baseline;display: flex;flex-direction: row-reverse;justify-content: flex-end;
}
.flex-row-reverse-end-stretch {align-items: stretch;display: flex;flex-direction: row-reverse;justify-content: flex-end;
}
.flex-row-reverse-center-start {align-items: flex-start;display: flex;flex-direction: row-reverse;justify-content: center;
}
.flex-row-reverse-center-end {align-items: flex-end;display: flex;flex-direction: row-reverse;justify-content: center;
}
.flex-row-reverse-center {align-items: center;display: flex;flex-direction: row-reverse;justify-content: center;
}
.flex-row-reverse-center-baseline {align-items: baseline;display: flex;flex-direction: row-reverse;justify-content: center;
}
.flex-row-reverse-center-stretch {align-items: stretch;display: flex;flex-direction: row-reverse;justify-content: center;
}
.flex-row-reverse-between-start {align-items: flex-start;display: flex;flex-direction: row-reverse;justify-content: space-between;
}
.flex-row-reverse-between-end {align-items: flex-end;display: flex;flex-direction: row-reverse;justify-content: space-between;
}
.flex-row-reverse-between {align-items: center;display: flex;flex-direction: row-reverse;justify-content: space-between;
}
.flex-row-reverse-between-baseline {align-items: baseline;display: flex;flex-direction: row-reverse;justify-content: space-between;
}
.flex-row-reverse-between-stretch {align-items: stretch;display: flex;flex-direction: row-reverse;justify-content: space-between;
}
.flex-row-reverse-around-start {align-items: flex-start;display: flex;flex-direction: row-reverse;justify-content: space-around;
}
.flex-row-reverse-around-end {align-items: flex-end;display: flex;flex-direction: row-reverse;justify-content: space-around;
}
.flex-row-reverse-around {align-items: center;display: flex;flex-direction: row-reverse;justify-content: space-around;
}
.flex-row-reverse-around-baseline {align-items: baseline;display: flex;flex-direction: row-reverse;justify-content: space-around;
}
.flex-row-reverse-around-stretch {align-items: stretch;display: flex;flex-direction: row-reverse;justify-content: space-around;
}
.flex-y-start-start {align-items: flex-start;display: flex;flex-direction: column;justify-content: flex-start;
}
.flex-y-start-end {align-items: flex-end;display: flex;flex-direction: column;justify-content: flex-start;
}
.flex-y-start {align-items: center;display: flex;flex-direction: column;justify-content: flex-start;
}
.flex-y-start-baseline {align-items: baseline;display: flex;flex-direction: column;justify-content: flex-start;
}
.flex-y-start-stretch {align-items: stretch;display: flex;flex-direction: column;justify-content: flex-start;
}
.flex-y-end-start {align-items: flex-start;display: flex;flex-direction: column;justify-content: flex-end;
}
.flex-y-end-end {align-items: flex-end;display: flex;flex-direction: column;justify-content: flex-end;
}
.flex-y-end {align-items: center;display: flex;flex-direction: column;justify-content: flex-end;
}
.flex-y-end-baseline {align-items: baseline;display: flex;flex-direction: column;justify-content: flex-end;
}
.flex-y-end-stretch {align-items: stretch;display: flex;flex-direction: column;justify-content: flex-end;
}
.flex-y-center-start {align-items: flex-start;display: flex;flex-direction: column;justify-content: center;
}
.flex-y-center-end {align-items: flex-end;display: flex;flex-direction: column;justify-content: center;
}
.flex-y-center {align-items: center;display: flex;flex-direction: column;justify-content: center;
}
.flex-y-center-baseline {align-items: baseline;display: flex;flex-direction: column;justify-content: center;
}
.flex-y-center-stretch {align-items: stretch;display: flex;flex-direction: column;justify-content: center;
}
.flex-y-between-start {align-items: flex-start;display: flex;flex-direction: column;justify-content: space-between;
}
.flex-y-between-end {align-items: flex-end;display: flex;flex-direction: column;justify-content: space-between;
}
.flex-y-between {align-items: center;display: flex;flex-direction: column;justify-content: space-between;
}
.flex-y-between-baseline {align-items: baseline;display: flex;flex-direction: column;justify-content: space-between;
}
.flex-y-between-stretch {align-items: stretch;display: flex;flex-direction: column;justify-content: space-between;
}
.flex-y-around-start {align-items: flex-start;display: flex;flex-direction: column;justify-content: space-around;
}
.flex-y-around-end {align-items: flex-end;display: flex;flex-direction: column;justify-content: space-around;
}
.flex-y-around {align-items: center;display: flex;flex-direction: column;justify-content: space-around;
}
.flex-y-around-baseline {align-items: baseline;display: flex;flex-direction: column;justify-content: space-around;
}
.flex-y-around-stretch {align-items: stretch;display: flex;flex-direction: column;justify-content: space-around;
}
.flex-column-reverse-start-start {align-items: flex-start;display: flex;flex-direction: column-reverse;justify-content: flex-start;
}
.flex-column-reverse-start-end {align-items: flex-end;display: flex;flex-direction: column-reverse;justify-content: flex-start;
}
.flex-column-reverse-start {align-items: center;display: flex;flex-direction: column-reverse;justify-content: flex-start;
}
.flex-column-reverse-start-baseline {align-items: baseline;display: flex;flex-direction: column-reverse;justify-content: flex-start;
}
.flex-column-reverse-start-stretch {align-items: stretch;display: flex;flex-direction: column-reverse;justify-content: flex-start;
}
.flex-column-reverse-end-start {align-items: flex-start;display: flex;flex-direction: column-reverse;justify-content: flex-end;
}
.flex-column-reverse-end-end {align-items: flex-end;display: flex;flex-direction: column-reverse;justify-content: flex-end;
}
.flex-column-reverse-end {align-items: center;display: flex;flex-direction: column-reverse;justify-content: flex-end;
}
.flex-column-reverse-end-baseline {align-items: baseline;display: flex;flex-direction: column-reverse;justify-content: flex-end;
}
.flex-column-reverse-end-stretch {align-items: stretch;display: flex;flex-direction: column-reverse;justify-content: flex-end;
}
.flex-column-reverse-center-start {align-items: flex-start;display: flex;flex-direction: column-reverse;justify-content: center;
}
.flex-column-reverse-center-end {align-items: flex-end;display: flex;flex-direction: column-reverse;justify-content: center;
}
.flex-column-reverse-center {align-items: center;display: flex;flex-direction: column-reverse;justify-content: center;
}
.flex-column-reverse-center-baseline {align-items: baseline;display: flex;flex-direction: column-reverse;justify-content: center;
}
.flex-column-reverse-center-stretch {align-items: stretch;display: flex;flex-direction: column-reverse;justify-content: center;
}
.flex-column-reverse-between-start {align-items: flex-start;display: flex;flex-direction: column-reverse;justify-content: space-between;
}
.flex-column-reverse-between-end {align-items: flex-end;display: flex;flex-direction: column-reverse;justify-content: space-between;
}
.flex-column-reverse-between {align-items: center;display: flex;flex-direction: column-reverse;justify-content: space-between;
}
.flex-column-reverse-between-baseline {align-items: baseline;display: flex;flex-direction: column-reverse;justify-content: space-between;
}
.flex-column-reverse-between-stretch {align-items: stretch;display: flex;flex-direction: column-reverse;justify-content: space-between;
}
.flex-column-reverse-around-start {align-items: flex-start;display: flex;flex-direction: column-reverse;justify-content: space-around;
}
.flex-column-reverse-around-end {align-items: flex-end;display: flex;flex-direction: column-reverse;justify-content: space-around;
}
.flex-column-reverse-around {align-items: center;display: flex;flex-direction: column-reverse;justify-content: space-around;
}
.flex-column-reverse-around-baseline {align-items: baseline;display: flex;flex-direction: column-reverse;justify-content: space-around;
}
.flex-column-reverse-around-stretch {align-items: stretch;display: flex;flex-direction: column-reverse;justify-content: space-around;
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/61267.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

labview中的调用链

在有些项目中会用到调用链,用我自己的理解来说就像是递归函数那样层层调用,然后结果回退到第一次开始调用的main函数哪里,这里对于传值的时候还是非常好用,通过更改子VI然后来改变主VI的里面函数的值来实现这个效果。 我们可以看…

MySQL初学之旅(3)约束

目录 1.前言 2.正文 2.1约束类型 2.2NULL约束 2.3UNIQUE约束 2.4DEFAULT约束 2.5PRIMARY KEY主键约束 2.6FOREIGN KEY外键约束 2.7CHECK约束 3.小结 1.前言 哈喽大家好啊,今儿来继续给大家分享最近学习的MySQL和约束相关的知识点,希望大家一起…

Ubuntu Linux使用前准备动作 配置SSH

在 Ubuntu 系统中配置 SSH 服务可以通过以下步骤进行: 1、安装ssh服务 1)打开终端(可以使用快捷键 Ctrl Alt T)。 2)运行以下命令安装 OpenSSH 服务器: sudo apt-get update:这一步是更新…

在MATLAB中实现自适应滤波算法

自适应滤波算法是一种根据信号特性自动调整滤波参数的数字信号处理方法,其可以有效处理噪声干扰和信号畸变问题。在许多实时数据处理系统中,自适应滤波算法得到了广泛应用。在MATLAB中,可以使用多种方法实现自适应滤波算法。本文将介绍自适应…

【Vue笔记】基于vue3 + element-plus + el-dialog封装一个自定义的dialog弹出窗口组件

这篇文章,介绍一下如何使用vue3+element-plus中的el-dialog组件,自己封装一个通用的弹出窗口组件。运行效果如下所示: 目录 1.1、父子组件通信 1.2、自定义VDialog组件(【v-model】模式) 1.2.1、编写VDialog组件代码 1.2.2、使用VDialog组件 1.2.3、运行效果 1.3、自…

学习笔记024——Ubuntu 安装 Redis遇到相关问题

目录 1、更新APT存储库缓存: 2、apt安装Redis: 3、如何查看检查 Redis版本: 4、配置文件相关设置: 5、重启服务,配置生效: 6、查看服务状态: 1、更新APT存储库缓存: sudo apt…

学习记录:js算法(九十九):冗余连接

文章目录 冗余连接思路一 冗余连接 树可以看成是一个连通且 无环 的 无向 图。 给定往一棵 n 个节点 (节点值 1~n) 的树中添加一条边后的图。添加的边的两个顶点包含在 1 到 n 中间,且这条附加的边不属于树中已存在的边。图的信息记录于长度为 n 的二维数…

记录———封装uni-app+vant(u-upload)上传图片组件

上传图片回显,自定义图片回显样式 这段代码是一个Vue组件,主要实现了图片上传和预览的功能。组件接收了父组件传递的图片列表、最大图片数量和上传状态等属性。在模板中,使用了uni-easyinput组件和u-upload组件来实现图片上传和预览功能。在…

【图像处理识别】数据集合集!

本文将为您介绍经典、热门的数据集,希望对您在选择适合的数据集时有所帮助。 1 CNN-ImageProc-Robotics 机器人 更新时间:2024-07-29 访问地址: GitHub 描述: 通过 CNN 和图像处理进行机器人对象识别项目侧重于集成最先进的深度学习技术和…

高亮变色显示文本中的关键字

效果 第一步:按如下所示代码创建一个用来高亮显示文本的工具类: public class KeywordUtil {/*** 单个关键字高亮变色* param color 变化的色值* param text 文字* param keyword 文字中的关键字* return*/public static SpannableString highLigh…

[javascript]js的五子棋让红蓝双方自己跟自己下棋

运行效果&#xff08;这是未分出胜负&#xff09;&#xff1a; 这是分出胜负&#xff1a; 源代码&#xff0c;把下边的代码放到1.html&#xff0c;然后用浏览器打开&#xff0c;就可以&#xff0c;然后刷新网页&#xff1a; <!DOCTYPE html> <html><body>&l…

【list的模拟实现】—— 我与C++的模拟实现(十四)

一、list节点 ​ list是一个双向循环带头的链表&#xff0c;所以链表节点结构如下&#xff1a; template<class T>struct ListNode{T val;ListNode* next;ListNode* prve;ListNode(int x){val x;next prve this;}};二、list迭代器 2.1、list迭代器与vector迭代器区别…

ssh隧道代理访问内网应用

目录 场景 ssh配置 .ssh目录结构 常见文件及用途 config id_rsa 和 id_rsa.pub authorized_keys known_hosts&#xff1a; known_hosts.old&#xff1a; environment&#xff1a; ssh_config&#xff1a; 配置隧道访问内网应用流程 1.生成密钥对 2.将公钥添加到远…

从0开始学习机器学习--Day26--聚类算法

无监督学习(Unsupervised learning and introduction) 监督学习问题的样本 无监督学习样本 如图&#xff0c;可以看到两者的区别在于无监督学习的样本是没有标签的&#xff0c;换言之就是无监督学习不会赋予主观上的判断&#xff0c;需要算法自己去探寻区别&#xff0c;第二张…

基于YOLOv8深度学习的智慧农业猪行为检测系统研究与实现(PyQt5界面+数据集+训练代码)

随着智慧农业的快速发展&#xff0c;畜牧业的智能化管理已逐渐成为提高生产效率、提升动物福利、降低运营成本的关键手段之一。在此背景下&#xff0c;畜牧场对动物行为的自动化监测需求日益增长&#xff0c;尤其是在大型养猪场&#xff0c;猪群的日常行为检测对于疾病预防、饲…

C++:指针和引用

指针的基础 数据在内存当中是怎么样被存储的 数据在内存中的存储方式取决于数据的类型和计算机的体系结构 基本数据类型 整数类型&#xff1a;整数在内存中以二进制补码的形式存储。对于有符号整数&#xff0c;最高位为符号位&#xff0c;0 表示正数&#xff0c;1 表示负数。…

使用esp32c3开发板通过wifi连网络web服务器

实验基本拓扑就是&#xff1a; esp32c3开发板通过Wifi模块连上局域网&#xff0c;局域网一台服务器通过FastAPI提供8000端口的web服务&#xff0c;在esp32c3开发板中烧录micropython固件&#xff0c;在python交互模式下&#xff0c;连上Wifi模块&#xff0c;并使用socket模块获…

自动化运维-检测Linux服务器CPU、内存、负载、IO读写、机房带宽和服务器类型等信息脚本

前言&#xff1a;以上脚本为今年8月1号发布的&#xff0c;当时是没有任何问题&#xff0c;但现在脚本里网络速度测试py文件获取不了了&#xff0c;测速这块功能目前无法实现&#xff0c;后面我会抽时间来研究&#xff0c;大家如果有建议也可以分享下。 脚本内容&#xff1a; #…

网络安全:我们的安全防线

在数字化时代&#xff0c;网络安全已成为国家安全、经济发展和社会稳定的重要组成部分。网络安全不仅仅是技术问题&#xff0c;更是一个涉及政治、经济、文化、社会等多个层面的综合性问题。从宏观到微观&#xff0c;网络安全的重要性不言而喻。 宏观层面&#xff1a;国家安全与…

通威传媒:移动AI数字人OLED透明屏应用案例

在科技与创新不断交融的今天&#xff0c;尼伽OLED品牌与通威传媒携手合作&#xff0c;共同推出了移动AI数字人OLED透明屏显示设备。这款设备不仅融合了尼伽OLED品牌的卓越显示技术与通威传媒的深厚积累&#xff0c;更在定点介绍、手动讲解模式、中控控制以及数字人联动等方面实…