diff --git "a/\346\262\210\350\202\262\346\236\227/20241114-\346\226\207\344\273\266\347\273\223\346\236\204\344\273\245\345\217\212\346\263\250\346\204\217\351\241\271.md" "b/\346\262\210\350\202\262\346\236\227/20241114-\346\226\207\344\273\266\347\273\223\346\236\204\344\273\245\345\217\212\346\263\250\346\204\217\351\241\271.md" deleted file mode 100644 index 99627c5de98c022701287ba07078da202c1f65d6..0000000000000000000000000000000000000000 --- "a/\346\262\210\350\202\262\346\236\227/20241114-\346\226\207\344\273\266\347\273\223\346\236\204\344\273\245\345\217\212\346\263\250\346\204\217\351\241\271.md" +++ /dev/null @@ -1,31 +0,0 @@ -# 基本结构 -* 文件夹 - * 解决方案(创建语法 : `dotnet new sln -n 解决方案名`) - * src文件夹(里面的子级文件统称项目) - * mvc项目(一个 | 创建语法 : `dotnet new mve -o mvc项目名`) - * 类库(多个 | 创建语法 : `dotnet new calsslib -o 类库名`) - -# 解决方案与项目绑定 -语法:`dotnet sln add 绑定项目的路径` - -# mvc项目目录文件解析 -* mvc项目.csproj -> 配置文件(定义项目的依赖项、输出项等信息) -* program.cs -> 应用程序的入口 -* wwwroot -> 存放静态文件(css、js、图片等文件 | 这些文件可以通过浏览器直接访问)、 -* views -> 视图(需要跟控制器一一对应 | 控制器类名(去掉Controllr) =》 文件夹名称 / 控制器类名的方法名 =》 控制器类名内的方法名.cshtml文件) -* controllers -> 控制器(命名需要加上Controller) - 简单的基本语法: -  -* obj 和 bin -> 缓存软件 -* Models -> 存放应用程序的数据模型(一般是数据库) -* appsettings.json -> 存储应用程序的配置信息 - -# views引用wwwroot内的文件 -`~/文件夹(例如:css)/文件` - -# 程序的启动与关闭 -启动:`dotnet run` -关闭:`ctrl + c` - -# 今日练习 - diff --git "a/\347\206\212\345\200\251/20241114-mvc\347\273\203\344\271\240\345\217\212\344\275\234\344\270\232.md" "b/\347\206\212\345\200\251/20241114-mvc\347\273\203\344\271\240\345\217\212\344\275\234\344\270\232.md" deleted file mode 100644 index 537fc9f55f8c68bb02e6eaf794c5a5f846e394d0..0000000000000000000000000000000000000000 --- "a/\347\206\212\345\200\251/20241114-mvc\347\273\203\344\271\240\345\217\212\344\275\234\344\270\232.md" +++ /dev/null @@ -1,13 +0,0 @@ -## 笔记 -1、dotnet new mvc -o 名 -cd 名 -Views->Home->项目名.cshtml -Controllers引用项目方法名 -2、wwwroot->css->建项目名.css->写样式 -3、.cshtml里用link引用样式 href="~/css/项目名.css" -4、dotnet run --project 名 -5、ctrl+c 结束任务 - -## 作业 -如图: - \ No newline at end of file diff --git "a/\350\202\226\347\276\216\345\221\210/20241114-mvc\347\273\203\344\271\240\345\217\212\347\254\224\350\256\260.md" "b/\350\202\226\347\276\216\345\221\210/20241114-mvc\347\273\203\344\271\240\345\217\212\347\254\224\350\256\260.md" deleted file mode 100644 index 5d831b7310394b59442e023253edc87ca26918e0..0000000000000000000000000000000000000000 --- "a/\350\202\226\347\276\216\345\221\210/20241114-mvc\347\273\203\344\271\240\345\217\212\347\254\224\350\256\260.md" +++ /dev/null @@ -1,13 +0,0 @@ -## 笔记 -1、dotnet new mvc -o 名 -Views->Home->项目名.cshtml -Controllers引用项目方法名 -2、wwwroot->css->建项目名.css->写样式 -3、.cshtml里用link引用样式 href="~/css/项目名.css" -4、dotnet run --project 名 -5、ctrl+c 结束任务 - - -## 作业 -如图: - \ No newline at end of file diff --git "a/\351\203\255\346\242\246\345\252\233/20241114-dotnet\346\240\267\345\274\217.md" "b/\351\203\255\346\242\246\345\252\233/20241114-dotnet\346\240\267\345\274\217.md" deleted file mode 100644 index b386506f9cb294600eeb9999a62e78362c6ca3f6..0000000000000000000000000000000000000000 --- "a/\351\203\255\346\242\246\345\252\233/20241114-dotnet\346\240\267\345\274\217.md" +++ /dev/null @@ -1,11 +0,0 @@ -1、dotnet new mvc -o 名 -Views->Home->项目名.cshtml -Controllers引用项目方法名 -2、wwwroot->css->建项目名.css->写样式 -3、.cshtml里用link引用样式 href="~/css/项目名.css" -4、dotnet run --project 名 -5、ctrl+c 结束任务 - - - - \ No newline at end of file diff --git "a/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241119\347\254\224\350\256\260.md" "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241119\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..5a4d4addf77d7cb9584db6291764723dc0962b86 --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241119\347\254\224\350\256\260.md" @@ -0,0 +1,11 @@ +# 控制器 +名字:控制器名+Controller.cs 文件内的基本组成: + +using Microsoft.AspNetCore.Mvc +namespace MVC项目名.Controlers; +public class 类名 : Controller +{ + public 返回值 方法名(参数){ + return 值; + } +} \ No newline at end of file diff --git "a/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241121\347\254\224\350\256\260.md" "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241121\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..aaf30593532942ca5a0c4f864c4750e16ffae95e --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241121\347\254\224\350\256\260.md" @@ -0,0 +1,26 @@ +## POST 请求的处理及示例 + +### `POST` 请求的基本概念 + +`POST` 请求用于向服务器发送数据,通常用来提交表单信息或者发送 JSON 数据。与 `GET` 请求不同,`POST` 请求的数据不会暴露在 URL 中,而是通过请求体发送。 + +### 示例:接收并显示昵称 + +以下是一个简单的 ASP.NET Core 控制器示例,它接收客户端通过 `POST` 请求发送的 JSON 数据,获取其中的昵称并在网页上显示。 + +### POST 请求头 + +##### 模拟POST请求 + +发送的 `POST` 请求 + +请求体: + +```json +{ + "nickname": "测试名字" +} +``` + +- **请求头**:`Content-Type: application/json` 表示请求体中的数据是 JSON 格式。 +- **请求体**:包含了需要传输的数据,这里是 `nickname` 字段和它的值 `"测试名字"`。 diff --git "a/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241122\347\254\224\350\256\260.md" "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241122\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..39aeba3ff60ba72cf6a616adb8374af21e3b8d21 --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241122\347\254\224\350\256\260.md" @@ -0,0 +1,78 @@ + +##### 返回结果 + +```http +HTTP/1.1 200 OK +Connection: close +Content-Type: text/html; charset=utf-8 +Date: Mon, 18 Nov 2024 14:22:21 GMT +Server: Kestrel +Transfer-Encoding: chunked + +
接收到的昵称是:测试名字
+``` + +### 控制器部分 + +#### 模型类 (`NicknameModel`) + +```csharp +public class NicknameModel +{ + public required string Nickname { get; set; } +} +``` + +- **作用**:模型类定义了一个 `Nickname` 字段,用于接收客户端发送的昵称。通过 `required` 关键字,确保客户端必须提供 `nickname` 数据,否则会出现错误。 + +#### 控制器类 (`PostController`) + +```csharp +public class PostController : Controller +{ + [HttpPost] + public IActionResult Index([FromBody] NicknameModel model) + { + // 从请求中获取昵称数据 + string nickname = model.Nickname; + + // 将昵称存储到 ViewData 中,以便在视图中使用 + ViewData["Nickname"] = nickname; + + // 返回视图 + return View(); + } +} +``` + +- **作用**:控制器接收 `POST` 请求中的数据,并将昵称存储到 `ViewData` 中,最后返回一个视图来显示该昵称。 + + `[FromBody]` 表示框架从请求体中获取数据,并将其自动转换为方法参数所需的类型。在此示例中,它会将请求体中的 JSON 数据转换为 `NicknameModel` 对象。 + +#### 视图部分 (`Index.cshtml`) + +```html +@using Microsoft.AspNetCore.Mvc.ViewFeatures +@{ + ViewData["Title"] = "昵称显示"; +} +接收到的昵称是:@Html.Raw(ViewData["Nickname"])
+@* @Html.Raw() 会告诉 Razor 引擎将 ViewData["Nickname"] 渲染为原始 HTML 内容,不进行转义。 *@ +``` + +- **作用**:视图部分用来显示传递过来的昵称。通过 `@ViewData["Nickname"]`,在页面中显示控制器传递过来的昵称数据。 + + 且通过 `@Html.Raw(ViewData["Nickname"])`,在页面中显示控制器传递过来的昵称数据。`@Html.Raw()` 会防止 HTML 转义,直接渲染原始内容。 + +### 代码流向 + +1. **客户端**:通过 `POST` 请求发送 JSON 数据到服务器。 +2. **控制器**:接收并解析 `POST` 请求中的数据。 +3. **视图**:展示控制器传递的数据。 + +### 总结 + +- **`POST` 请求**:用于向服务器提交数据。常用于表单提交或 JSON 数据交互。 +- **模型类**:用于接收客户端发送的 JSON 数据。 +- **控制器类**:处理 `POST` 请求,解析数据并传递给视图。 +- **视图部分**:显示控制器传递的数据,最终在网页上展现给用户。 \ No newline at end of file diff --git "a/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241126\347\254\224\350\256\260.md" "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241126\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..69ccf8a541da452bd9e58317a7037bfb1dc88d7d --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241126\347\254\224\350\256\260.md" @@ -0,0 +1,17 @@ +正向代理(Forward Proxy)和反向代理(Reverse Proxy)是网络代理服务器的两种类型,它们的主要区别在于代理服务器与客户端和目标服务器之间的交互方式: + +1. **正向代理(Forward Proxy)**: + - **客户端视角**:客户端通过代理服务器来访问互联网上的资源。 + - **请求流程**:客户端首先向代理服务器发送请求,代理服务器再将请求转发到目标服务器,目标服务器响应后,代理服务器将响应返回给客户端。 + - **目的**:主要用于客户端访问控制、缓存、过滤和访问日志记录等。 + - **位置**:正向代理服务器位于客户端和目标服务器之间。 + - **匿名性**:客户端的真实IP地址对目标服务器来说是隐藏的,但代理服务器的IP地址是可见的。 + +2. **反向代理(Reverse Proxy)**: + - **服务器视角**:服务器通过反向代理服务器来处理来自客户端的请求。 + - **请求流程**:客户端直接向反向代理服务器发送请求,反向代理服务器将请求转发到一个或多个后端服务器,并将后端服务器的响应返回给客户端。 + - **目的**:主要用于负载均衡、提高缓存效率、SSL加密/解密、压缩、安全控制等。 + - **位置**:反向代理服务器位于客户端和后端服务器之间。 + - **透明性**:客户端通常不知道其请求被代理,并且客户端的真实IP地址对后端服务器来说是隐藏的。 + +简而言之,正向代理更侧重于客户端的访问控制和匿名性,而反向代理则侧重于服务器的负载均衡和安全性。在实际应用中,这两种代理可以根据需要单独使用或结合使用。 diff --git "a/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241128\347\254\224\350\256\260.md" "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241128\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..a88d6294c049f0ae5f67273bf84bd6e8fdc939fc --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/20241128\347\254\224\350\256\260.md" @@ -0,0 +1,22 @@ +视图定义属性 +定义: @{ 属性(键值对) } 调用: @键 + +接收view +@model 命名空间.类名 @Model.键 + +定位点 + + +作业 + + + + + + + + + + + + \ No newline at end of file diff --git "a/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/Linux\344\275\234\344\270\232.md" "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/Linux\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..aea879c4a5ba13b220f77e4aaaee810f12e7de80 --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/Linux\344\275\234\344\270\232.md" @@ -0,0 +1,145 @@ +# 搭建十个域名 +1. + + +2. + + +3. + + +4. + + +5. + + +6. + + +7. + + +8. + + +9. + + +10. + + +# 部分命令任务 +任务:更新软件源,命令:apt update,并了解这一步的实际用处和意义 +1.apt update -y apt upgrade -y + +任务:更新软件和补丁,命令:apt upgrade -y,并了解这一步的实际用处意义 +2. + + +任务:熟悉并完成以下练习 +3. + + +任务:尝试使用以下几种方式分别登录服务器,说明它们分别的注意事项,并说明它们之间的区别 + +ssh客户端 +tabby应用 +xShell +putty + +### SSH客户端 + +**注意事项:** +1. 确保拥有服务器的SSH IP地址和端口号。 +2. 输入正确的用户名和密码。 +3. 根据个人喜好设置字符集、字体样式及大小、窗口保存的内容行数等。 +4. 设置自动保持连接,以免服务器长时间没有收到数据包而自动断开SSH连接。 + +### Tabby应用 + +**注意事项:** +1. Tabby支持多平台,确保下载适合自己操作系统的版本。 +2. Tabby自带SFTP功能,可以用于文件传输。 +3. 在设置SSH连接时,需要填写终端名称、IP地址、端口号、账号密码等信息。 +4. Tabby支持插件,可以根据需要安装和配置插件以增强功能。 + +### XShell + +**注意事项:** +1. XShell主要支持Windows系统。 +2. 设置不间断连接,以防止服务器因长时间无操作而断开连接。 +3. 关闭响铃和X11,特别是在免费版本中,以避免提示购买Xmanager。 +4. 可以调整视图设置和主题设置,以适应个人偏好。 + +### PuTTY + +**注意事项:** +1. PuTTY支持WIN和MAC系统,确保下载适合自己操作系统的版本。 +2. 修改字符集解决中文乱码问题。 +3. 修改字体样式及大小,以及窗口保存的内容行数。 +4. 设置自动保持连接,以维持SSH连接的稳定性。 + +### 区别 + +1. **平台支持:** + - **PuTTY**:支持Windows和Mac系统。 + - **Tabby**:支持Windows、MacOS(包括Intel芯片和M1芯片)、Linux。 + - **XShell**:主要支持Windows系统。 + +2. **界面和体验:** + - **PuTTY**:界面较为简单,功能基本。 + - **Tabby**:提供炫酷的终端页面,简单易用,支持插件。 + - **XShell**:提供多标签模式,方便同时管理多个服务器。 + +3. **功能丰富性:** + - **PuTTY**:功能相对较少,适合快速连接。 + - **Tabby**:功能丰富,自带SFTP功能,支持多平台。 + - **XShell**:功能丰富,提供多标签和文件传输等高级功能。 + +4. **文件传输:** + - **PuTTY**:需要使用PuTTYgen将pem文件转换成ppk格式进行文件传输。 + - **Tabby**:自带SFTP功能,方便文件传输。 + - **XShell**:如果安装了xftp,可以直接调用xftp进行文件传输。 + +5. **开源性:** + - **PuTTY**:免费开源。 + - **Tabby**:开源。 + - **XShell**:有商业版本,提供更多高级功能和技术支持。 + +1. + + +2. + + +3. + + +4. + + +5. + + +6. + + +7-9 + + +10-12. + + + +13-17 + + +18-23 + + +# 安装sdk环境 + + +# 任务:使用nginx反向代理,部署简单的MVC项目 + \ No newline at end of file diff --git "a/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/MVC\344\275\234\344\270\232.md" "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/MVC\344\275\234\344\270\232.md" new file mode 100644 index 0000000000000000000000000000000000000000..f1fd43aabbe50c628bf9ce6aa25188df126ca199 --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/MVC\344\275\234\344\270\232.md" @@ -0,0 +1,80 @@ +1.创建一个控制台项目,没有任何选项,体会项目名称和什么有关系 + + + +2.创建一个控制项目,项目名称Blog + + + +3.创建一个控制台项目,输出到Blog目录 + + + +4.创建一个MVC项目,指定项目名称 + + + +5.创建一个MVC项目,指定输出目录 + + + +6.创建一个带解决方案,其下有一个MVC项目,3个类库项目的“综合项目” + + + +7.创建一个项目,在默认控制器(Home)下,新增一个Action方法,名为Ok,同时为其创建对应视图以显示这个视图 + + + +8.创建一个项目,创建一个新的控制器,名为Blogs,新的控制器拥有一个名为Index的Action,该方法返回一个视图,视图显示“神级预判” + + + +9.给第8题的新控制,添加一个新的Action,名为Music,不接受任何参数,并返回对应的视图,视图显示“顶级打野” + + + +10.给第8题的新控制器,新增一个Action,名为List,不接受任何参数,并返回对应视图,视图显示一个经典CRUD界面 + + public IActionResult List() + { + return View(); + } + +11.新增一个控制器,名为Products,该控制器具有一个名为Edit的Action,这个Action接受一个int类型的参数id,显示这个id + +```html +public class ProductsController : Controller +{ + public IActionResult Edit(int id) + { + ViewBag.Id = id; + return View(); + } +} +创建对应视图Views/Products/Edit.cshtml + +编辑的产品ID:@ViewBag.Id
+``` + +12.在11题的新控制器中,新增一个名为Create的Action,该Action接受一个类型为Students(有姓名、年龄、体长属性)的参数,并展示该参数的姓名属性 + +```html +public class ProductsController : Controller{ + public IActionResult Create(){ + var pro=new ProductStudent{ + Name="tony", + Age="24", + weight="359t" + }; + return View(pro); +} + } + public class ProductStudent{ + public string Name{get;set;}=null!; + public string Age{get;set;}=null!; + public string Tall{get;set;}=null!; + + } +``` \ No newline at end of file diff --git "a/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/\345\237\272\347\241\200\350\203\275\345\212\233.cs" "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/\345\237\272\347\241\200\350\203\275\345\212\233.cs" new file mode 100644 index 0000000000000000000000000000000000000000..a1c2656f9809c09a3d59dec91308fd3e6fbd2cb8 --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/1124\344\275\234\344\270\232/\345\237\272\347\241\200\350\203\275\345\212\233.cs" @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Mvc; + +namespace MVCRandomExample.Controllers +{ + public class RandomGeneratorController : Controller + { + // 1. 生成一个随机整数,范围[0,100],注意是否包含 + public ActionResult GenerateRandomIntegerInclusive() + { + Random random = new Random(); + int randomNumber = random.Next(0, 101); // [0, 100] inclusive + return Content($"Random Number (inclusive): {randomNumber}"); + } + + // 2. 生成一个随机整数,范围(0,100],注意是否包含 + public ActionResult GenerateRandomIntegerExclusive() + { + Random random = new Random(); + int randomNumber = random.Next(1, 101); // (0, 100] exclusive + return Content($"Random Number (exclusive): {randomNumber}"); + } + + // 3. 生成10个随机整数,范围[5,80],注意是否包含 + public ActionResult GenerateMultipleRandomIntegers() + { + Random random = new Random(); + ListAge: @Model.Age
+Name | +Price | +
---|---|
@item.Name | +$@item.Price | +
Name | ++ | |
---|---|---|
@user.Name | +@user.Email | ++ @Html.ActionLink("Edit", "Edit", new { id = user.Id }) | + @Html.ActionLink("Details", "Details", new { id = user.Id }) | + @Html.ActionLink("Delete", "Delete", new { id = user.Id }) + | +
序号 | +标题 | +作者 | +操作 | +
---|---|---|---|
1 | +hhh | +alien | +
+
+
+
+
+ |
+
2 | +hhh | +alien | +
+
+
+
+
+ |
+
3 | +hhh | +alien | +
+
+
+
+
+ |
+
4 | +hhh | +alien | +
+
+
+
+
+ |
+
Learn about building Web apps with ASP.NET Core.
+Use this page to detail your site's privacy policy.
diff --git "a/\351\231\210\345\207\257\347\220\233/Blog/Views/Shared/Error.cshtml" "b/\351\231\210\345\207\257\347\220\233/Blog/Views/Shared/Error.cshtml" new file mode 100644 index 0000000000000000000000000000000000000000..a1e04783c67a0edd13abb2745ca97f3a0bc6bc93 --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/Blog/Views/Shared/Error.cshtml" @@ -0,0 +1,25 @@ +@model ErrorViewModel +@{ + ViewData["Title"] = "Error"; +} + +
+ Request ID: @Model.RequestId
+
+ Swapping to Development environment will display more detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
diff --git "a/\351\231\210\345\207\257\347\220\233/Blog/Views/Shared/_Layout.cshtml" "b/\351\231\210\345\207\257\347\220\233/Blog/Views/Shared/_Layout.cshtml" new file mode 100644 index 0000000000000000000000000000000000000000..2442e8ee59f62f5414dce3928928aaca4ef60d2a --- /dev/null +++ "b/\351\231\210\345\207\257\347\220\233/Blog/Views/Shared/_Layout.cshtml" @@ -0,0 +1,49 @@ + + + + + +`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\n\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n\n// Abbreviations\n//\n// 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-bs-original-title] { // 1\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n text-decoration-skip-ink: none; // 4\n}\n\n\n// Address\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\n\n// Lists\n\nol,\nul {\n padding-left: 2rem;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\n// 1. Undo browser default\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // 1\n}\n\n\n// Blockquote\n\nblockquote {\n margin: 0 0 1rem;\n}\n\n\n// Strong\n//\n// Add the correct font weight in Chrome, Edge, and Safari\n\nb,\nstrong {\n font-weight: $font-weight-bolder;\n}\n\n\n// Small\n//\n// Add the correct font size in all browsers\n\nsmall {\n @include font-size($small-font-size);\n}\n\n\n// Mark\n\nmark {\n padding: $mark-padding;\n background-color: $mark-bg;\n}\n\n\n// Sub and Sup\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n\nsub,\nsup {\n position: relative;\n @include font-size($sub-sup-font-size);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n// Links\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n\n &:hover {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n &,\n &:hover {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n// Code\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-code;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n direction: ltr #{\"/* rtl:ignore */\"};\n unicode-bidi: bidi-override;\n}\n\n// 1. Remove browser default top margin\n// 2. Reset browser default of `1em` to use `rem`s\n// 3. Don't allow content to break outside\n\npre {\n display: block;\n margin-top: 0; // 1\n margin-bottom: 1rem; // 2\n overflow: auto; // 3\n @include font-size($code-font-size);\n color: $pre-color;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n @include font-size(inherit);\n color: inherit;\n word-break: normal;\n }\n}\n\ncode {\n @include font-size($code-font-size);\n color: $code-color;\n word-wrap: break-word;\n\n // Streamline the style when inside anchors to avoid broken underline and more\n a > & {\n color: inherit;\n }\n}\n\nkbd {\n padding: $kbd-padding-y $kbd-padding-x;\n @include font-size($kbd-font-size);\n color: $kbd-color;\n background-color: $kbd-bg;\n @include border-radius($border-radius-sm);\n\n kbd {\n padding: 0;\n @include font-size(1em);\n font-weight: $nested-kbd-font-weight;\n }\n}\n\n\n// Figures\n//\n// Apply a consistent margin strategy (matches our type styles).\n\nfigure {\n margin: 0 0 1rem;\n}\n\n\n// Images and content\n\nimg,\nsvg {\n vertical-align: middle;\n}\n\n\n// Tables\n//\n// Prevent double borders\n\ntable {\n caption-side: bottom;\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: $table-cell-padding-y;\n padding-bottom: $table-cell-padding-y;\n color: $table-caption-color;\n text-align: left;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `