Duplicate CSS Files

When I drag a User component into my project’s stage, the component’s CSS file gets added a second time, with a -1 suffix (eg, my-component-1.css). This shouldn’t be necessary because the project already contained instances of the component and the .css file was already in the project.

I’m sure this is my fault. I work on two different computers which may have differing configurations. I may also have edited the wrong .css file at some stage, creating a version management issue.

I could probably work out the exact circumstances in which BSS creates duplicate *-1.css files by trial and error. But if anyone already knows those circumstances, you could save me the time!

One work around for this project would be to create the component again, and deselect the CSS file being included with the component.

The number suffix on the end of the CSS file is not your fault, and simply how BSS handles file names which match.

Maybe in the future the software can be built with this knowledge of if the CSS is already included, it won’t try adding it again for user components.

Thanks for your reply. That would work, but I’d rather not create an incomplete component to work around some other thing I’m doing wrong.

When used as intended, components don’t duplicate CSS files, so BSS knows when it isn’t necessary to splice in another instance of the file (-1). I’d be interested to know how BSS checks whether to do so or not; maybe it checks timestamp or content.

1 Like