使用 POD 编写 CSS 文档

发布于 2024-09-27 06:20:36 字数 408 浏览 5 评论 0原文

我正在开发一个具有 Perl 后端的项目的前端。 CSS 文件变得相当大和复杂,需要一些文档和目录。

我查看了各种指南、幻灯片和博客文章,其中每个人都提出了自己的纯文本格式风格。似乎没有好的标准,导致文档难以移植、打印和阅读。

由于我们的其他文档位于 POD(普通旧文档)/perldoc 中,我想我也可以尝试使用 POD 作为 CSS,但这感觉非常不传统,坦率地说有点奇怪。我尝试了一个简单的:

/*
=pod
...
=cut
*/ 

它在 perldoc 中读起来很好。

在发布之前,我们从 CSS 文件中删除所有注释,这样大小就不会成为问题。

对于使用 POD 记录 CSS 是否还有其他实际的反对意见?您是否使用过其他标准来记录您的 CSS?

I'm working on the frontend of a project which has a Perl backend. The CSS files are getting pretty big and complicated, and are in need of some documentation and Tables of Contents.

I looked at various guides, slides and blog posts where everyone suggest their own style of plain text formatting. There seems to be no good standard, making the documentation difficult to port, print, and read.

Since our other documentation is in POD (Plain Old Documentation) / perldoc I figured I could try using POD for the CSS as well, but this feels very unconventional and frankly a bit weird. I tried a simple:

/*
=pod
...
=cut
*/ 

and it reads fine in perldoc.

Before launch, we strip all comments from our CSS files so size would not be an issue.

Are there any other practical objections to documenting CSS with POD? Have you used some other standard to document your CSS?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨小沫ゞ 2024-10-04 06:20:36

我发现 CSSDOC 它基于 JavaDoc / DocBlock。显然,不仅仅是我在寻找记录高级 CSS 文件的标准方法。它看起来很有前途,但由于我们已经在项目的其他部分使用了 POD,因此将它也用于 CSS 是最有意义的。

这意味着我们可以按照我们希望的任何格式生成网站的完整文档。

I have found CSSDOC which is based on JavaDoc / DocBlock. Apparently it's not only me searching for a standard way of documenting advanced CSS files. It looks pretty promising, but since we already use POD for other parts of our project, it makes the most sense to use it for CSS as well.

That means we can generate a complete documentation of our site to any format we wish.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文