From e6160ea32d63831b16f0a34d74926b34984ae70e Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 23 Jun 2019 05:36:15 +0000 Subject: [PATCH] set tab-size to 2 in code_diff_old_code_block and code_diff_new_code_block to make tabs align properly inside span in google chrome. there should be a proper way. i'm ignorant about it --- codepot/src/codepot/views/code_diff.php | 4 ++-- codepot/src/css/code.css | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/codepot/src/codepot/views/code_diff.php b/codepot/src/codepot/views/code_diff.php index bdbb02c1..bc950f29 100644 --- a/codepot/src/codepot/views/code_diff.php +++ b/codepot/src/codepot/views/code_diff.php @@ -428,7 +428,7 @@ $this->load->view ( } print ''; - print ''; + print ''; $actual_line_no = 1; foreach ($file['content'] as $x) { @@ -527,7 +527,7 @@ $this->load->view ( } print ''; - print ''; + print ''; $actual_line_no = 1; foreach ($file['content'] as $x) { diff --git a/codepot/src/css/code.css b/codepot/src/css/code.css index 9cca8c10..70d14322 100644 --- a/codepot/src/css/code.css +++ b/codepot/src/css/code.css @@ -520,6 +520,15 @@ background-color: black; } +#code_diff_old_code_block, +#code_diff_new_code_block { + /* in google-chrome, i can't align tabs properly with a different tab size in this view. + * tabs in this view are shown in spans unlike the main code view */ + tab-size: 2; + -moz-tab-size: 2; + -o-tab-size: 2; +} + /*----------------------------------------------- * project source search view (including folder view) *-----------------------------------------------*/