SimCSS

版本 1.0.4 (991.6 KB) 作者: Marco Gavelli
Apply CSS stylesheets to Simulink models.
20.0 次下载
更新时间 2018/10/6

With SimCSS, you can easily customize Simulink blocks through a simple CSS file.

1) What styles can be applied?

Any property of a Simulink block can be set with SimCSS. Everywhere you would normally use set_param(handle,'myproperty',myvalue), you could use the SimCSS equivalent {myproperty: myvalue}.

2) How to select which blocks apply a style to?

* => applies to every block
.line => applies to lines
.annotation => applies to annotations
#id (e.g. #name) => applies to blocks called "name"
element (e.g Constant) => applies to every constant block
element1 element2 (e.g Subsystem Outport) => applies to outports inside subsystems
[Prop=Value] (e.g [tag=test]) => applies to blocks with a Tag equal to "test"

3) Quick example to get started.

1. Create a "styles.css" file with your styles

/* I like big fonts all over the place */
* {FontSize: 20}
/* Applies to outports inside subsystems */
Subsystem Outport {BackgroundColor: "magenta";}
/* Applies to Goto and From blocks */
From, Goto {BackgroundColor: "yellow"; ShowName: "off"}
/* Change Constant blocks size */
Constant {width: 70; Height: 40}

2. Apply styles to current Simulink model

applyCSS(bdroot,'styles.css')

引用格式

Marco Gavelli (2026). SimCSS (https://github.com/gave92/SimCSS), GitHub. 检索时间: .

MATLAB 版本兼容性
创建方式 R2016b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Subsystems 的更多信息
致谢

参考作品: Matlab CSS (MSS)

docs/images/logo

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.4

updated readme

1.0.3

updated readme

1.0.1

updated readme

1.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库